State component and presets

Every property of UWSRFStateComponent, what each behaviour preset configures, Stable IDs, and when initial state is captured.

UWSRFStateComponent is the one component you add to an Actor to make it part of the world-state system. It registers the Actor with the world subsystem at BeginPlay, owns the Stable ID, and carries the region membership and the reset policy.

Details panel layout

The panel is grouped into three sections, in this order:

SectionContents
WSRF | SetupBehavior Preset, Regions, Reset Policy
WSRF | AdvancedOrigin, Capture Timing, Reset Priority
WSRF | Advanced | IdentityThe Stable ID, read-only

Everything a normal integration touches lives in Setup. Advanced exists for unusual spawned-Actor workflows and ordering problems.

Properties

PropertyTypeDefaultMeaning
BehaviorPresetEWSRFBehaviorPresetCustomApplies a safe configuration for a common gameplay role
RegionsFGameplayTagContaineremptyWhich world regions own this Actor
ResetPolicyFWSRFResetPolicysee belowWhen the Actor resets and how
OriginEWSRFActorOriginAutoPlaced or runtime-spawned; normally detected automatically
CaptureTimingEWSRFInitialCaptureTimingDeferredAfterOwnerBeginPlayWhen the initial state is captured
ResetPriorityint320Lower values restore first among independent Actors
StableGuidFGuidgeneratedThe Stable ID, visible per instance, not editable by hand

The default policy is immediately usable: it responds to the Manual and Region reset reasons, uses Resettable persistence, AutomaticThenInterface restore, and removes runtime Actors on a matching reset.

Behaviour presets

ApplyBehaviorPreset is callable in the editor and at runtime. Seven roles ship with the plugin:

PresetIntent
CustomNothing is applied; you configure the policy yourself
EnemyReturns after rest, death or region reset
Boss / EliteStays defeated permanently, even after resting
Breakable PropMay be genuinely destroyed, then respawned
Permanent ShortcutPersistent: the change survives ordinary resets
Unique PickupOne Shot: consumed permanently
TrapResettable armed state
Runtime ActorA temporary spawned Actor, removed on a matching reset

A preset writes concrete values into the policy. It is a starting point, not a locked mode: after applying one you can still change any trigger, mode or strategy, and the component keeps working.

Presets are the fast path, not a limitation

Everything a preset does can be configured by hand with Custom. Presets exist because most Actors in a checkpoint-driven game fall into a handful of recognisable roles, and re-deriving each one by hand is where configuration mistakes come from.

Stable IDs

Every component serialises a WSRF-owned FGuid. It is the identity that survives destruction, streaming, respawn and saving.

Rules the framework enforces:

  • IDs are generated automatically when a component is created in the editor;
  • PIE duplication keeps the editor-authored ID, so a PIE session tests the real identity;
  • ordinary Actor duplication in the editor generates a new ID;
  • a duplicate live ID is rejected and logged rather than silently accepted;
  • runtime registrations may request an explicit ID or accept a session-only generated one.

GetStableId returns it at runtime. In the editor, repairs are explicit actions in the Inspector — see Validation and debug visualization.

Do not copy Stable IDs by hand

The ID field is visible for diagnostics, not for editing. Duplicating a configured Actor inside the editor is the supported way to get a correctly generated new ID.

Initial capture timing

EWSRFInitialCaptureTiming decides when the automatic snapshot is taken:

ValueBehaviour
DeferredAfterOwnerBeginPlayDefault. Captured one tick after the owner’s BeginPlay, so construction and initial gameplay setup are already applied
ImmediateAtComponentBeginPlayCaptured during the component’s own BeginPlay
ManualNothing is recaptured until you call Recapture Initial State

All three modes apply pending resets and deferred persistent restores. Only the recapture of the initial state depends on this setting.

Immediate runs before the owner's BeginPlay

ImmediateAtComponentBeginPlay applies a pending restore during the component’s own BeginPlay, which is before the owning Actor’s BeginPlay has run. A Blueprint that initialises variables in BeginPlay will overwrite the restored values immediately afterwards. Leave the default unless you have a specific reason.

RecaptureInitialState re-reads the current state and makes it the new baseline. Call it after intentional runtime initialisation — for example an Actor that arms itself, or one whose starting transform is chosen by a spawner. In Manual mode, if a pending reset or persistent restore arrives before any state was captured, WSRF still performs the minimum capture required to restore safely.

Reset priority

Among Actors that are not related by attachment, restoration order follows ascending ResetPriority, then Stable ID as a deterministic tie-break. Attachment relationships always win: a parent is restored before its children regardless of priority.

Most Actors should leave this at 0. Raise it only when a real dependency exists and cannot be expressed as an attachment.

Events

DelegateFires
OnOwnerResetStartedWhen a reset that matches this Actor begins
OnOwnerResetCompletedWhen that reset has finished for this Actor

Both carry the FWSRFResetRequest, so a Blueprint can branch on the reason tag — a Rest reset and a PlayerDeath reset can feel different without changing the policy.

Runtime configuration

FunctionUse
SetResetPolicyReplace the policy at any time; the change applies immediately
SetRegionMembershipMove an Actor to a different region while playing
ApplyBehaviorPresetApply a role at runtime
RecaptureInitialStateMake the current state the new baseline
IsRegisteredWithWSRFConfirm registration succeeded

Runtime policy changes are session-only

SetResetPolicy updates the live policy immediately, but it does not modify the authored component default, so the change is lost when the session ends. A reset that is already running finishes with the policy it selected when it started; the new policy applies to later resets.

Last updated: 2026-09-04

Type to search titles, sections and keywords.