Overview
TickManager is the central timing system for the package. Core gameplay logic should respond to ticks instead of relying directly on Unity's Update loop.
This keeps movement and future gameplay systems consistent even when the visual frame rate changes.
Inspector Settings
Tick Interval
Time in seconds between simulation ticks. Lower values make the simulation advance more frequently. Higher values create a slower, chunkier tick rhythm.
Start Paused
When enabled, the simulation starts paused and will not advance until resumed through code.
Public API
StepOneTick()Immediately advances the simulation by exactly one tick. Useful for debugging or manual stepping while paused.
SetPaused(bool paused)Sets whether the tick loop is paused.
TogglePaused()Switches the tick loop between paused and unpaused.
GetTickProgress01()Returns a 0-1 value showing how far the current tick interval has progressed.
OnTickEvent fired once for every simulation tick. Subscribe gameplay systems here when they need to process logic on the tick.
Runtime Properties
| TickInterval | Current configured tick interval. |
|---|---|
| CurrentTick | Current simulation tick number. |
| IsPaused | Whether the tick loop is currently paused. |
Common Usage
TickManager.Instance.OnTick += HandleTick;
private void HandleTick(long tick)
{
// Run gameplay logic here.
}
Related Systems
- MovementMotor
- UnitViewMotor
- Future RPG systems such as combat, cooldowns, and interaction timing.