Skip to content

Script API ​

Script authoring surface: ScriptComponent, handler lifecycle and the script-facing signals facade.

Classes ​

ClassDescription
ScriptComponentBase class for scene scripts; construct through ScriptHost.mount.
MapScriptRegistryMutable registry used by hosts and tests.
ScriptStartTimeoutErrorRaised when one script onStart exceeds the configured budget.
ScriptHostMounts every suity.script component in the runtime scene.

Interfaces ​

InterfaceDescription
ScriptSignalsNode-local state-provider facade exposed to scripts (docs/130 S5).
SignalWatchOptionsOptions accepted by ScriptSignals.watch*.
ScriptSignalsScopeScript-scoped provider registry. Wraps the host ScriptSignals facade and tracks every disposer returned by registerSignalProvider/provideSignal so the script handler can release them on unmount without the script doing bookkeeping.
ScriptAssetProviderOptional engine-provided asset loader; resolve falls back to the scene.
ScriptAssetsLightweight asset facade handed to scripts (this.assets).
ScriptContextRuntime context injected into every script instance.
ScriptComponentStaticStatic metadata optionally declared on a ScriptComponent subclass.
ScriptRegistryResolves a script asset uid to its default-exported constructor.
ScriptInstanceInfoMounted script descriptor exposed on the host handle.
ScriptHostHandleHandle returned by ScriptHost.mount; update must be driven by the host.
ScriptHostOptionsOptions for ScriptHost.mount.
ScriptSubscriptionScope-
ScriptAssetSceneScene capabilities used by createScriptAssets.

Type Aliases ​

Type AliasDescription
ComponentHandle-
ScriptSignalFieldsConcise field map accepted by ScriptSignals.provideSignal(...).
ScriptConstructorConstructor shape used by the runtime; not instanceof based. Subclasses may declare the optional static metadata (runtimeKey/displayName).

Variables ​

VariableDescription
SUITY_SDK_VERSIONUnified public SDK version stored in the build manifest (docs/177).
DEFAULT_SCRIPT_START_TIMEOUT_MSDefault budget for sequential onStart calls.

Functions ​

FunctionDescription
createScriptSignalsScopeCreates a scoped signals facade over base. Registrations are tracked and released by dispose(); each call still returns its own idempotent disposer. Returns signals: undefined when the host does not expose a provider API.
scopeNodeSignalsReturns node with its signals property replaced by a scoped facade. When the host exposes no signals, the original node is returned untouched so identity comparisons and legacy hosts keep working.
createScriptRegistryCreates a mutable script registry seeded from scripts.
createScriptAssetsBuilds the this.assets facade, forwarding to the scene/engine loader.
createSubscriptionScope-
runWithTimeout-
describeError-

References ​

Node ​

Renames and re-exports ComponentHandle


Scene ​

Renames and re-exports ComponentHandle


ScriptNodeSignals ​

Renames and re-exports ComponentHandle


SIGNAL_REFRESH_KEY ​

Renames and re-exports ComponentHandle


SCRIPT_COMPONENT_TYPE ​

Renames and re-exports ComponentHandle


ScriptComponentHandler ​

Renames and re-exports ComponentHandle


ScriptComponentHandlerOptions ​

Renames and re-exports ComponentHandle


ScriptInstanceState ​

Renames and re-exports ComponentHandle

Suity developer documentation · API generated by TypeDoc