Interface: ScriptContext<TCamera>
Runtime context injected into every script instance.
Type Parameters
| Type Parameter | Default type |
|---|---|
TCamera | unknown |
Properties
| Property | Type | Description |
|---|---|---|
scene | Scene<TCamera> | Unified SDK scene facade (queries, structure, subscriptions, camera). |
node | Node | Unified SDK node that owns this script mount. |
input | InputState | Shared input state. |
assets | ScriptAssets | Asset facade for resolve/load. |
componentRef | string | Stable id of the owning suity.script component (docs/123 搂7.4). |
runtimeKey? | string | Optional runtime class key for dynamically added scripts (docs/123 S3). |
Methods
log()
ts
log(...args): void;Writes a log line to the host console / runtime output.
Parameters
| Parameter | Type |
|---|---|
...args | unknown[] |
Returns
void
warn()
ts
warn(...args): void;Writes a warning to the host console / runtime output.
Parameters
| Parameter | Type |
|---|---|
...args | unknown[] |
Returns
void
error()
ts
error(...args): void;Writes an error to the host console / runtime output.
Parameters
| Parameter | Type |
|---|---|
...args | unknown[] |
Returns
void
requestScene()?
ts
requestScene?(path): void;Asks the host to switch to another scene by path.
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
void
