> For the complete documentation index, see [llms.txt](https://dante-3.gitbook.io/dante-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dante-3.gitbook.io/dante-docs/modular-experience-system/modular-experience-manager-component/usage-scenarios.md).

# Usage Scenarios

### Scenario 1: Auto Setup (Zero Code)

The component is automatically added by the subsystem. The experience is resolved from WorldSettings. You don't need to write anything.

### Scenario 2: Manual Call from GameMode

```cpp
void AMyGameMode::InitGameState()
{
    Super::InitGameState();

    UModularExperienceManagerComponent* ExpManager =
        GameState->FindComponentByClass<UModularExperienceManagerComponent>();

    if (ExpManager)
    {
        FPrimaryAssetId ExpId(
            FPrimaryAssetType("ModularExperienceDefinition"),
            FName("B_MyExperience"));
        ExpManager->ChangeCurrentExperience(ExpId);
    }
}
```

### Scenario 3: Reacting When Experience Loads

```cpp
void AMyActor::BeginPlay()
{
    Super::BeginPlay();

    AGameStateBase* GS = GetWorld()->GetGameState();
    if (auto* ExpMgr = GS->FindComponentByClass<UModularExperienceManagerComponent>())
    {
        ExpMgr->CallOrRegister_OnExperienceLoaded(
            FOnExperienceLoaded::FDelegate::CreateUObject(
                this, &ThisClass::HandleExperienceLoaded));
    }
}

void AMyActor::HandleExperienceLoaded(const UModularExperienceDefinition* Experience)
{
    // Experience loaded — start gameplay
}
```
