OnUpdate
function OnUpdate(deltaTime: number)Called once every frame.
- Updates must be enabled for the script for this lifecycle function to be called.
- Ignored by Module scripts.
Stage Start Lifecycle Function Call Order
- Top Level Code > OnInit - Global Script
- Top Level Code > OnInit - Client Control Hierarchy
- OnEnable - Client Control Hierarchy
- OnStart - Client Control Hierarchy
- OnEnable - Global Script
- OnStart - Global Script
- OnUpdate > OnLevelUpdate - Global Script
- OnUpdate > OnLevelUpdate - Client Control Hierarchy
- OnDestroy - Global Script (On Stage End)