> 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-definition/methods.md).

# Methods

### GetActionByClass

```cpp
UFUNCTION(BlueprintPure, Category = "Experience",
          DisplayName = "Get Action By Class",
          meta = (DeterminesOutputType = "ActionClass"))
UGameFeatureAction* GetActionByClass(TSubclassOf<UGameFeatureAction> ActionClass) const;
```

Returns the first action of the given class. Can be used from Blueprint.

### FindAction\<T> (C++ Only)

```cpp
template <typename T>
T* FindAction() const;
```

C++ template helper. Searches for an action with compile-time type safety:

```cpp
if (auto* AddComp = Definition->FindAction<UGameFeatureAction_AddComponents>())
{
    // AddComponents action found
}
```

## Asset Manager Registration

Since Experience Definitions are `UPrimaryDataAsset`, they must be discovered by the **Asset Manager**. `DefaultGame.ini`:

```ini
+PrimaryAssetTypesToScan=(PrimaryAssetType="ModularExperienceDefinition",
    AssetBaseClass="/Script/ModularExperienceSystem.ModularExperienceDefinition",
    bHasBlueprintClasses=True,
    bIsEditorOnly=False,
    Directories=((Path="/Game")),
    Rules=(Priority=-1,ChunkId=-1,bApplyRecursively=True,CookRule=AlwaysCook))
```

{% hint style="info" %}
The `bHasBlueprintClasses=True` setting ensures that Blueprint subclasses are also discovered.
{% endhint %}

## Creating in the Editor

Content Browser → Right-Click → **Miscellaneous** → **Modular Experience Definition**

## Example Usage

### Minimal Experience

A simple experience with a single component injection action:

### Layered Experience

Modular layering using parent chains:

```
B_BaseExperience
  ├── Actions: DefaultPawn settings, base UI
  │
  └── B_ShooterExperience (ParentExperience = B_BaseExperience)
        ├── Actions: Weapon system, crosshair, ammo HUD
        │
        └── B_CompetitiveShooter (ParentExperience = B_ShooterExperience)
              └── Actions: Scoreboard, round timer, matchmaking
```
