Skip to content

format

typescript
GameObject.allowEnable

class: GameObject

description

(Read Only) The chained enable state of the current object in the object tree it belongs to.

The current object traces back to the root object in the parent object hierarchy. If any object is disabled, it returns false. If all objects are enabled, it returns true.

parameter

param_nametypedescription

reture

typedescription
booleanThe chained enable state of the current object in the object tree it belongs to.

code example

javascript
let go = new GameObject("test");
Debug.Log(go.allowEnable);