format
typescript
GameObject.allowEnableclass: 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_name | type | description |
|---|
reture
| type | description |
|---|---|
boolean | The 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);