script
Since 0.6
Use it in a scene entity's components list as { "type": "script", … }. The contract writes the fields flat and refuses unknown keys.
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
module | string | yes | |||
props | object | no |
Rules that can refuse it
animator-transition-unheardauthor-failedbehaviour-detachedbehaviour-prop-unknownbuild.asset-missingbuild.importbuild.module-not-foundbuild.module-outside-projectcamera-fov-overrides-scenedangling-reffeel/buriedinput-reader-not-playerinput-unboundplay/no-responseplay/player-script-errorprefab-unused
Example
From the contract's tested fixture fixtures/contract/full20/scene.json#door.
{
"type": "script",
"module": "sliding-door",
"props": {
"openOn": "hazard-reached",
"speed": 1.5
}
}