Skip to content

Format

typescript
Scene.IsGameObjectExists(go)

class: Scene

Description

Check if the specified game object exists in the current scene.

Parameters

param_nametypedescription
goGameObjectThe game object to check.

Return

typedescription
booleanWhether the specified game object exists.

Code Example

typescript
const scene = SceneManager.CreateScene("test");
const obj = new GameObject("test1");
const exist:boolean = scene.IsGameObjectExists(obj);