Skip to content

Interface: ScriptContext<TCamera> ​

Runtime context injected into every script instance.

Type Parameters ​

Type ParameterDefault type
TCameraunknown

Properties ​

PropertyTypeDescription
sceneScene<TCamera>Unified SDK scene facade (queries, structure, subscriptions, camera).
nodeNodeUnified SDK node that owns this script mount.
inputInputStateShared input state.
assetsScriptAssetsAsset facade for resolve/load.
componentRefstringStable id of the owning suity.script component (docs/123 搂7.4).
runtimeKey?stringOptional 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 ​

ParameterType
...argsunknown[]

Returns ​

void


warn() ​

ts
warn(...args): void;

Writes a warning to the host console / runtime output.

Parameters ​

ParameterType
...argsunknown[]

Returns ​

void


error() ​

ts
error(...args): void;

Writes an error to the host console / runtime output.

Parameters ​

ParameterType
...argsunknown[]

Returns ​

void


requestScene()? ​

ts
requestScene?(path): void;

Asks the host to switch to another scene by path.

Parameters ​

ParameterType
pathstring

Returns ​

void

Suity developer documentation · API generated by TypeDoc