SceneResource
1.2.0+
Base class for scene resources, such as:
- SceneResource
- .constructor(scene, index) ⇒ SceneResource
- .engine
- .index
- .isDestroyed
- .scene
.equals(other) ⇒ boolean
.constructor(scene: Prefab, index: number) ⇒ SceneResource
Param | Type | Description |
---|---|---|
scene | Prefab | |
index | number |
.engine: WonderlandEngine
Hosting engine instance.
.index: number
Index of this resource in the Scene’s manager.
.isDestroyed: boolean
true
if the object is destroyed, false
otherwise.
If erasePrototypeOnDestroy is true
,
reading a class attribute / method will throw.
.scene: Prefab
Hosting instance.
.equals(other: undefined | null | SceneResource) ⇒ boolean
Checks equality by comparing ids and not the JavaScript reference.
Deprecated: Use JavaScript reference comparison instead:
Param | Type | Description |
---|---|---|
other | undefined | null | SceneResource |