Manages DekiBehaviour lifecycle (InternalAwake, Awake, Start, Update).
More...
#include <LifecycleManager.h>
Manages DekiBehaviour lifecycle (InternalAwake, Awake, Start, Update).
Centralizes all lifecycle method invocation and reference resolution. Called by DekiEngine during the update phase, before rendering.
Lifecycle order:
- ProcessInternalAwake() - Resolves AssetRefs and ObjectRefs
- ProcessAwake() - Calls Awake() on all behaviours
- ProcessStart() - Calls Start() on all behaviours
- ProcessUpdate() - Called every frame for started behaviours
- Render (handled separately by render system)
◆ LifecycleManager()
| LifecycleManager::LifecycleManager |
( |
| ) |
|
|
default |
◆ ~LifecycleManager()
| LifecycleManager::~LifecycleManager |
( |
| ) |
|
|
default |
◆ SetProfilingCallbacks()
Set profiling callbacks for lifecycle method instrumentation.
When set, these callbacks are invoked around each Update/Start/Awake call with the component type name (e.g., "TestComponent.Update"). Set to nullptr to disable profiling (default on embedded devices).
◆ ProcessInternalAwake()
| void LifecycleManager::ProcessInternalAwake |
( |
Scene * | scene | ) |
|
Resolve AssetRefs and ObjectRefs for all behaviours that haven't awoken.
This is the internal setup phase where the engine resolves all dependencies before any user code runs.
- Parameters
-
◆ ProcessAwake()
| void LifecycleManager::ProcessAwake |
( |
Scene * | scene | ) |
|
Process Awake for all behaviours that haven't awoken yet.
Called after InternalAwake. All asset and object references are available at this point.
- Parameters
-
◆ ProcessStart()
| void LifecycleManager::ProcessStart |
( |
Scene * | scene | ) |
|
Process Start for all behaviours that haven't started yet.
Called after all Awake calls complete. Safe to access other components.
- Parameters
-
◆ ProcessUpdate()
| void LifecycleManager::ProcessUpdate |
( |
Scene * | scene | ) |
|
Process Update for all behaviours that have started.
- Parameters
-
◆ ProcessRuntimeUpdate()
| void LifecycleManager::ProcessRuntimeUpdate |
( |
Scene * | scene, |
|
|
float | deltaTime ) |
Drive RuntimeUpdate() on every component that opts in via NeedsRuntimeUpdate().
This is the engine-runtime counterpart to the editor play-mode walk (EditorApp::UpdatePlayMode -> updateComponentsRecursive). Components such as RollerComponent / ScrollComponent put their per-frame physics in RuntimeUpdate(), which is distinct from the script DekiBehaviour::Update() driven by ProcessUpdate(). Without this call their momentum/snap state machines never tick outside the editor.
- Parameters
-
| scene | The current scene |
| deltaTime | Time since last frame in SECONDS |
◆ s_ProfileBegin
◆ s_ProfileEnd
The documentation for this class was generated from the following file: