Format
typescript
Scene.IsGameObjectExists(go)class: Scene
Description
Check if the specified game object exists in the current scene.
Parameters
| param_name | type | description |
|---|---|---|
| go | GameObject | The game object to check. |
Return
| type | description |
|---|---|
boolean | Whether the specified game object exists. |
Code Example
typescript
const scene = SceneManager.CreateScene("test");
const obj = new GameObject("test1");
const exist:boolean = scene.IsGameObjectExists(obj);