Interface: SceneNodeHandle
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
ref | public | string | Stable runtime ref. Prefab direct children use instance/child; the source-root uid is not part of the path. Old instance/sourceRootUid/... refs are not accepted. |
uid | public | string | - |
name | public | string | - |
layer | public | string | Normalized layer id; defaults to default. |
tags | public | readonly string[] | Normalized, sorted tag ids. |
node | public | SuitySceneNode | Raw document node data. Prefer the component/query methods. |
signals | readonly | NodeSignals | Node-local state provider facade (docs/130 S5); safe on invalid nodes. |
parent | public | SceneNodeHandle | null | Parent handle; null for top-level nodes and the scene root. |
children | public | SceneNodeHandle[] | Direct child handles. |
scene | public | SceneInstance | Owning scene instance. |
activeSelf | readonly | boolean | True when this node's own active flag is not false. |
activeInHierarchy | readonly | boolean | True when this node and all ancestors are active. |
vectorParts? | public | Map<string, Container<ContainerChild>> | Named suity.vector part containers (keyed by data-part or id). |
prefab? | public | PrefabInstanceInfo | Present when this node is a Prefab instance root. |
Methods
hasLayer()
hasLayer(layer): boolean;Parameters
| Parameter | Type |
|---|---|
layer | string |
Returns
boolean
hasTag()
hasTag(tag): boolean;Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
setLayer()
setLayer(layer): boolean;Parameters
| Parameter | Type |
|---|---|
layer | string |
Returns
boolean
setTags()
setTags(tags): boolean;Parameters
| Parameter | Type |
|---|---|
tags | readonly string[] |
Returns
boolean
setActive()
setActive(active): SceneNodeHandle;Sets this node's own active state (requires a mutable scene).
Parameters
| Parameter | Type |
|---|---|
active | boolean |
Returns
SceneNodeHandle
getChildByName()
getChildByName(name): SceneNodeHandle | null;First direct child with this name (case-insensitive fallback).
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
SceneNodeHandle | null
resolve()
resolve(path): SceneNodeHandle | null;Resolves a child path relative to this node, e.g. "Child/Grandchild". Each segment matches name exactly; duplicate names use the first child.
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
SceneNodeHandle | null
component()
component(type): SuitySceneComponent | undefined;Returns the first direct component of type, or undefined.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
SuitySceneComponent | undefined
getComponent()
getComponent<T>(type):
| ComponentHandleFor<T>
| undefined;Returns the first component of type on this node only.
Type Parameters
| Type Parameter |
|---|
T extends string |
Parameters
| Parameter | Type |
|---|---|
type | T |
Returns
| ComponentHandleFor<T> | undefined
getComponentInChildren()
getComponentInChildren<T>(type):
| ComponentHandleFor<T>
| undefined;Searches this node and its descendants for the first component of type.
Type Parameters
| Type Parameter |
|---|
T extends string |
Parameters
| Parameter | Type |
|---|---|
type | T |
Returns
| ComponentHandleFor<T> | undefined
getComponents()
getComponents<T>(type): ComponentHandleFor<T>[];Returns all components of type on this node and its descendants.
Type Parameters
| Type Parameter |
|---|
T extends string |
Parameters
| Parameter | Type |
|---|---|
type | T |
Returns
ComponentHandleFor<T>[]
addComponent()
addComponent(component, componentRef?): SceneComponentHandle;Adds component to this node and returns its component handle.
component requires type; optional role, asset, enabled and properties follow the engine catalog. Extra fields are passed through. Pass componentRef to choose a stable key; when omitted, the runtime generates one.
Parameters
| Parameter | Type |
|---|---|
component | SuitySceneComponent |
componentRef? | string |
Returns
removeComponent()
removeComponent(component): boolean;Removes the given component handle; false when it is no longer attached.
Parameters
| Parameter | Type |
|---|---|
component | SceneComponentHandle |
Returns
boolean
getComponentByRef()
getComponentByRef(componentRef):
| SceneComponentHandle<Record<string, unknown>>
| undefined;Returns the component at componentRef, or undefined when it is missing.
Parameters
| Parameter | Type |
|---|---|
componentRef | string |
Returns
| SceneComponentHandle<Record<string, unknown>> | undefined
addScript()
addScript(script, componentRef?): SceneComponentHandle;Adds a suity.script component and returns its handle.
Pass an asset UID string to mount a persisted script, or a script class / { runtimeKey, displayName } to mount a runtime script by key.
Parameters
| Parameter | Type |
|---|---|
script | string | ScriptClassLike |
componentRef? | string |
Returns
componentView()
componentView(type): unknown;Engine view for a component (Sprite/Vector/Text/Image display), or null.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
unknown
components()
components(): SuitySceneComponent[];All direct components on this node.
Returns
resolveAsset()
resolveAsset(ref): Promise<ResolvedAsset | null>;Resolves an asset using this node's document aliases.
Parameters
| Parameter | Type |
|---|---|
ref | string |
Returns
Promise<ResolvedAsset | null>
container()
Call Signature
container(): Container;Engine view for this node (container plus internal visual layer).
Returns
Container
Call Signature
container<T>(): T | null;Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
Returns
T | null
containerVisual()
Call Signature
containerVisual(): Container;Node visual layer (suity-visual). Recreated on node view refresh.
Returns
Container
Call Signature
containerVisual<T>(): T | null;Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
Returns
T | null
destroy()
destroy(): boolean;Removes this runtime-added node and its subtree from a mutable scene. Returns false if the handle is already invalid.
Removal runs component onDestroy, removes adapter views, updates indexes and emits nodeRemoved. Initial document nodes are protected; use scene.removeNode(ref, { allowStatic: true }) when explicitly intended.
Returns
boolean
