Concept: The Load Sequence

UCrimsonExperienceManagerComponent is a replicated state machine. Understanding its order explains most timing questions - why a component is missing in BeginPlay, why a client sees things later than the server.

The states

StateWhat is happening
UnloadedNo experience assigned yet.
LoadingThe experience and its action sets are being loaded as primary assets.
LoadingGameFeaturesEvery GameFeaturesToEnable plugin is activating.
LoadingChaosTestingDelayAn artificial delay, only when the chaos CVars are set. Skipped otherwise.
ExecutingActionsActions run: the experience's own first, then each action set's.
LoadedEverything is live. The three ready tiers broadcast here.
DeactivatingTeardown - actions are deactivated and unregistered.

Server and client run the same path

The server assigns the experience through SetCurrentExperience. The property is ReplicatedUsing, so a client receiving it starts its own load of the same experience rather than being told the result. Both machines therefore pass through every state, and the ready callbacks fire on both - which is why a client that joins a session in progress still gets a fully applied experience.

Actions decide their own net role
The state machine runs actions on both sides. Whether a given action does anything on a client is the action's decision - most component-adding actions expose server and client toggles.

Why BeginPlay is too early

Actors in a level begin play long before ExecutingActions. Anything an action creates - a component, a widget, an ability grant - does not exist yet at that point. This is not a race to win; it is the intended order. Register a callback instead: see How-To: Wait for the Experience.

Testing slow loads

Two console variables insert a delay before actions run, so you can see what a slow load looks like without a slow machine.

CVarEffect
crimson.chaos.ExperienceDelayLoad.MinSecsMinimum delay added before actions execute.
crimson.chaos.ExperienceDelayLoad.RandomSecsAdditional random delay on top of the minimum.
Verify
Set crimson.chaos.ExperienceDelayLoad.MinSecs 3 and play - the loading screen holds three seconds longer before anything the experience adds appears.

PIE runs several instances at once

UCrimsonExperienceManager is an engine subsystem that reference-counts Game Feature plugin activation across PIE worlds. Without it, one PIE instance finishing would deactivate a plugin another still needs. It requires no setup - it exists so multi-instance PIE behaves like separate processes.

See also

  • How-To: Wait for the Experience
  • Concept: What an Experience Is