Experience Pipeline
The experience pipeline is how CrimsonCore connects a data asset to a running match. It replaces hardcoded GameMode logic with a data-driven, async-loaded composition layer.
Boot sequence
| Step | Who | What happens |
|---|---|---|
| 1 | UCrimsonAssetManager | StartInitialLoading — cue manager init + GameData load |
| 2 | ACrimsonGameMode::InitGame | Schedules HandleMatchAssignmentIfNotExpectingOne next frame |
| 3 | ACrimsonGameMode | Resolves experience ID from: CLI → options string → DeveloperSettings → WorldSettings |
| 4 | UCrimsonExperienceManagerComponent | SetCurrentExperience — replicates to clients, starts load state machine |
| 5 | Both server and client | Unloaded → Loading → LoadingGameFeatures → ExecutingActions → Loaded |
| 6 | UCrimsonExperienceManagerComponent | Broadcasts OnExperienceLoaded (high-priority, standard, low-priority tiers) |
| 7 | ACrimsonGameMode | Receives OnExperienceLoaded (standard priority) → calls RestartPlayer for each waiting PC |
| 8 | ACrimsonGameMode | GetDefaultPawnClassForController uses PawnData.PawnClass; pawn spawned with PawnData injected |
| 9 | UCrimsonPawnExtensionComponent | Init-state machine: Spawned → DataAvailable → DataInitialized → GameplayReady |
| 10 | UCrimsonHeroComponent | On GameplayReady: binds input from PawnData.InputConfig, activates PawnData.DefaultCameraMode |
UCrimsonExperienceDefinition
Primary data asset that defines an entire game session. Referenced by ACrimsonWorldSettings and UCrimsonDeveloperSettings.
| Property | Description |
|---|---|
GameFeaturesToEnable | List of GameFeature plugin URLs to activate when this experience loads. |
DefaultPawnData | Fallback UCrimsonPawnData used when no player-state-level PawnData is set. |
Actions | Array of UGameFeatureActions executed after all plugins are active. |
ActionSets | Array of UCrimsonExperienceActionSet references — reusable action bundles shared across experiences. |
Waiting for the experience in C++
void UMyComponent::BeginPlay(){Super::BeginPlay();if (ACrimsonGameState* GS = GetWorld()->GetGameState<ACrimsonGameState>()){if (UCrimsonExperienceManagerComponent* ExpMgr =GS->FindComponentByClass<UCrimsonExperienceManagerComponent>()){ExpMgr->CallOrRegister_OnExperienceLoaded(FOnCrimsonExperienceLoaded::FDelegate::CreateUObject(this, &UMyComponent::OnExperienceReady));}}}
UAsyncAction_ExperienceReady
In Blueprint, use the
Wait for Experience Ready async action node. It fires the On Ready pin on both the server and client once the experience is fully loaded and all GameFeatureActions have executed.