The Destroy component is responsible for destroying a Game Object.
- Source code: gameobjects/components/Destroy.js (Line 12)
[readonly] destroyPhase : boolean
As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.
- Source code: gameobjects/components/Destroy.js (Line 22)
Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to
game, freeing it up for garbage collection.
If this Game Object has the Events component it will also dispatch the
Name Type Argument Default Description
Should every child of this object have its destroy method called as well?
- Source code: gameobjects/components/Destroy.js (Line 33)