Object lifecycle
Related terms: spawn, initialization, enable, disable, destroy, callbacks
The stages an object passes through: creation, initialization, active updates, disabling and destruction. Engines call lifecycle callbacks at these stages so code can prepare data, respond each frame and clean up.
Initialize before using an object. Subscribe to events when needed, and unsubscribe when finished. Disabling a pooled object is different from destroying it. Callback names and ordering depend on the engine.
- Further reading
- Unity: Order of execution for event functions