Base class for components with lifecycle methods.
More...
#include <DekiBehaviour.h>
Inherits DekiComponent.
Inherited by PlatformSetupComponent, and SetupComponent.
Base class for components with lifecycle methods.
DekiBehaviour extends DekiComponent with:
Lifecycle order:
- InternalAwake (engine) - Resolves AssetRefs and ObjectRefs
- Awake() - Component initialization, called once after refs are resolved
- Start() - Called once before first Update, after ALL Awake calls complete
- Update() - Called every frame
- Render (handled by RendererComponent)
Use DekiComponent for data-only components. Use DekiBehaviour for components that need engine processing.
◆ DekiBehaviour()
| DekiBehaviour::DekiBehaviour |
( |
| ) |
|
|
inline |
◆ ~DekiBehaviour()
| virtual DekiBehaviour::~DekiBehaviour |
( |
| ) |
|
|
virtualdefault |
◆ GetType()
◆ GetBaseType()
◆ AsBehaviour()
◆ Awake()
| virtual void DekiBehaviour::Awake |
( |
| ) |
|
|
inlinevirtual |
Called once after AssetRefs and ObjectRefs are resolved.
Use for component self-initialization. All asset references are available at this point.
◆ Start()
| virtual void DekiBehaviour::Start |
( |
| ) |
|
|
inlinevirtual |
Called once before first Update, after ALL Awake calls complete.
Use for cross-component setup. Safe to access other components since all components have been awakened.
Reimplemented in PlatformSetupComponent.
◆ Update()
| virtual void DekiBehaviour::Update |
( |
| ) |
|
|
inlinevirtual |
◆ HasAwoken()
| bool DekiBehaviour::HasAwoken |
( |
| ) |
const |
|
inline |
◆ HasStarted()
| bool DekiBehaviour::HasStarted |
( |
| ) |
const |
|
inline |
◆ MarkAwoken()
| void DekiBehaviour::MarkAwoken |
( |
| ) |
|
|
inline |
◆ MarkStarted()
| void DekiBehaviour::MarkStarted |
( |
| ) |
|
|
inline |
◆ NeedsUpdate()
| virtual bool DekiBehaviour::NeedsUpdate |
( |
| ) |
const |
|
inlinevirtual |
Runtime opt-out for Update() calls.
- Returns
- false to skip Update() this frame
Whether Update() exists at all is DeclaresUpdate(), generated from the class declaration. This flag is the per-instance switch on top of that: true by default, so declaring Update() is enough to be ticked; a behaviour that is idle can SetNeedsUpdate(false) to drop out of the per-frame loop and back in later.
◆ SetNeedsUpdate()
| void DekiBehaviour::SetNeedsUpdate |
( |
bool | needs | ) |
|
|
inline |
Enable or disable per-frame Update() calls.
- Parameters
-
| needs | Set to false to stop receiving Update() calls |
◆ StaticType
The documentation for this class was generated from the following file: