Zum Hauptinhalt springen

Timer Setup

USurvivalSubSystem provides four multicast update delegates. Activated components subscribe to them and execute one simulation step per pulse. This replaces per-component Tick.


Current Initialization Paths​

bUseSubsystemTimersbTimersOnlyExecuteOnServerCurrent code path
truetrueInitialize calls OnWorldReady(GetWorld); timers/manager created only for ListenServer or DedicatedServer
truefalseInitialize registers PostLoadMapWithWorld; world callback creates timers/manager without the server-only filter
falsetrueOnWorldReady enables external pulse mode and returns before creating CrossAffectManager
falsefalseInitialize neither calls nor registers OnWorldReady; external mode is not enabled by this path

The default true/true path excludes NM_Standalone and has no world-load retry if GetWorld is unavailable. Do not claim all modes work identically without validating or correcting the maintained implementation. Turning off server-only timers changes where pulses run; numerical component mutation still requires authority.


External Pulse API​

UpdateHealthComponent, UpdateFoodComponent, UpdateStaminaComponent and UpdateTempComponent broadcast their update delegate only when bUseExternalUpdatePulse is true. They do not activate components, target one Pawn or initialize CrossAffectManager. They pulse every subscribed component of that type in the subsystem.

A project scheduler must invoke pulses on the Game Thread at a chosen cadence. The current external-mode initialization skips the cross-affect manager, so external updates are not feature-equivalent to the internal path. Details and lifetime concerns are documented in Timers and Lifecycle.