Schemas / Play

rig.play.script

v1.0.0 · stable maturity: draft 2 fields 1 required

Fields

FieldTypeMeaning
className string required Host class or script name
asset entity optional Optional. rig.media.code or rig.media.asset_ref for the source

Named behavior attached to an entity. Format when present.

className is a name the host implements, the same idea as an action on rig.ai.behavior. It is not a callback, and the document does not carry a function pointer. An unknown name is skipped. Source text, when it travels, is the asset.

JSON Schema

Resolves at https://rig.works/schemas/rig.play.script.schema.json — raw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.play.script.schema.json",
  "title": "rig.play.script",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "className": {
      "$ref": "./_defs.schema.json#/$defs/string"
    },
    "asset": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    }
  },
  "required": [
    "className"
  ],
  "x-rig-maturity": "draft"
}

Seen in

play-scene.json