> 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/blueprint-reference.md).

# Blueprint Reference

All Blueprint nodes, async actions, subsystem methods, and function library functions.

***

## Async Actions

### Wait For Experience Ready

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FU8SYJJDpGYVyoy8JLbEK%2Fimage.png?alt=media&amp;token=ee22318a-aeae-4eb0-9d75-49622c33d54b" alt=""><figcaption></figcaption></figure>

Waits for the experience loading process to complete. Fires immediately if already loaded.

```
UAsyncAction_ExperienceReady::WaitForExperienceReady(WorldContextObject)
  ├── [Output] OnReady(Experience)
  └── [Input]  WorldContextObject (auto-filled)
```

| Pin                | Type       | Description                                 |
| ------------------ | ---------- | ------------------------------------------- |
| WorldContextObject | `UObject*` | Auto-filled                                 |
| OnReady            | Delegate   | Called with `UModularExperienceDefinition*` |

**Usage scenario:** Waiting for the experience to load in an actor's BeginPlay, then performing setup once loaded.

***

### Open User Facing Experience (By ID)

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FvVUWAH3Cto2hIATssGL0%2Fimage.png?alt=media&amp;token=dd278671-e962-4fa7-8029-414e5abaa921" alt=""><figcaption></figcaption></figure>

Opens a User Facing Experience by PrimaryAssetId: loads the asset, initiates map travel.

```
UAsyncAction_OpenUserFacingExperience::OpenUserFacingExperience(
    WorldContextObject, UserFacingExperienceId, bServerTravel)
  ├── [Output] OnLoaded(Experience)
  └── [Output] OnFailed(ErrorReason)
```

| Pin                    | Type              | Default | Description                         |
| ---------------------- | ----------------- | ------- | ----------------------------------- |
| WorldContextObject     | `UObject*`        | Auto    | Widget or actor                     |
| UserFacingExperienceId | `FPrimaryAssetId` | —       | UFE asset ID                        |
| bServerTravel          | `bool`            | `false` | `true` = ServerTravel (multiplayer) |
| OnLoaded               | Delegate          | —       | Travel initiated                    |
| OnFailed               | Delegate          | —       | With error message                  |

***

### Open User Facing Experience (Direct Reference)

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FfLXer348s9KTE8seJStj%2Fimage.png?alt=media&amp;token=9a8ad53b-467f-4119-9d92-d10c415df8f9" alt=""><figcaption></figcaption></figure>

Same operation using a direct object reference:

```
UAsyncAction_OpenUserFacingExperience::OpenUserFacingExperienceFromObject(
    WorldContextObject, UserFacingExperience, bServerTravel)
```

Skips the async load step if the asset is already loaded.

***

## Subsystem (UModularExperienceSubsystem)

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FPHGuIqge1j81qjoI3F5N%2Fimage.png?alt=media&amp;token=c73dd92e-0635-4233-80e1-e6161132952c" alt=""><figcaption></figcaption></figure>

Automatically created in every world as a World Subsystem. Accessed from Blueprints via the `Get Subsystem` node.

### Properties

| Property            | Type                         | Description                                               |
| ------------------- | ---------------------------- | --------------------------------------------------------- |
| `OnExperienceReady` | `Dynamic Multicast Delegate` | Fires when the experience is loaded. Blueprint Assignable |

### Methods

#### Get Experience Manager

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2F4Ksztd7OG2ir2xTnxFCQ%2Fimage.png?alt=media&amp;token=7a183b48-5c5b-4bf0-9f69-626518423692" alt=""><figcaption></figcaption></figure>

```cpp
UFUNCTION(BlueprintPure, DisplayName = "Get Experience Manager")
UModularExperienceManagerComponent* GetExperienceManager() const;
```

Returns the manager component on the GameState.

#### Is Experience Loaded

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FxrNiJwY32XV0WrSxbUiS%2Fimage.png?alt=media&amp;token=ee8c7565-38a8-4123-ab2f-32d513343b52" alt=""><figcaption></figcaption></figure>

```cpp
UFUNCTION(BlueprintPure)
bool IsExperienceLoaded() const;
```

#### Get Current Experience

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2Fbb1VEmeznJeg05ZsrbMP%2Fimage.png?alt=media&amp;token=8284fdd7-a53a-4129-bb35-f032969936a1" alt=""><figcaption></figcaption></figure>

```cpp
UFUNCTION(BlueprintPure)
const UModularExperienceDefinition* GetCurrentExperience() const;
```

#### Wait For Experience Ready

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FQG486q8a1T9gtOSBOTQT%2Fimage.png?alt=media&amp;token=a2637b3d-9fb4-4202-93c7-9d635dedabbc" alt=""><figcaption></figcaption></figure>

```cpp
UFUNCTION(BlueprintCallable, DisplayName = "Wait For Experience Ready")
void WaitForExperienceReady();
```

Receives a notification when the experience is ready via the `OnExperienceReady` delegate. If already loaded, fires on the next frame.

***

## Function Library (UModularExperienceFunctionLibrary)

Static Blueprint helper functions. Performs quick queries without accessing the subsystem.

### Experience Queries

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FdqFtDIvFPscO8Qz62Zqq%2Fimage.png?alt=media&amp;token=ea649ed5-552f-42b6-a17b-85ec71b406e3" alt=""><figcaption></figcaption></figure>

| Function                                       | Return                                | Description                             |
| ---------------------------------------------- | ------------------------------------- | --------------------------------------- |
| `GetExperienceManager(WorldContext)`           | `UModularExperienceManagerComponent*` | Returns the manager component           |
| `GetCurrentExperienceDefinition(WorldContext)` | `UModularExperienceDefinition*`       | Returns the loaded experience           |
| `GetCurrentExperienceId(WorldContext)`         | `FPrimaryAssetId`                     | Returns the loaded experience ID        |
| `IsExperienceLoaded(WorldContext)`             | `bool`                                | Checks whether the experience is loaded |
| `GetExperienceSubsystem(WorldContext)`         | `UModularExperienceSubsystem*`        | Returns the subsystem                   |

### User Facing Experience Queries

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FBVlxgS7cgqEYI6vaOTBo%2Fimage.png?alt=media&amp;token=3fac6a1f-f327-45ff-97ce-f3386ec3a2be" alt=""><figcaption></figcaption></figure>

| Function                                | Return                               | Description                             |
| --------------------------------------- | ------------------------------------ | --------------------------------------- |
| `GetUserFacingExperienceIdByName(Name)` | `FPrimaryAssetId`                    | Creates a PrimaryAssetId from a name    |
| `GetAllUserFacingExperiences()`         | `TArray<UMES_UserFacingExperience*>` | Returns all discovered UFEs (sync load) |

### Action Lookup

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FXouWev9PwWWFYTTTWFZ9%2Fimage.png?alt=media&amp;token=50adb8d9-aed2-4964-9d8c-e2dd518eb4a0" alt=""><figcaption></figcaption></figure>

| Function                                    | Return                | Description                                       |
| ------------------------------------------- | --------------------- | ------------------------------------------------- |
| `FindActionInDefinition(Definition, Class)` | `UGameFeatureAction*` | Searches for an action in the definition by class |
| `FindFacingActionInExperience(UFE, Class)`  | `UMES_FacingAction*`  | Searches for a facing action in the UFE by class  |

***

## Experience Manager Component (Blueprint API)

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FTNmT84CEcFM9WB45VYuv%2Fimage.png?alt=media&amp;token=3ec3718e-4fce-408c-9c9e-150d5c2bbf53" alt=""><figcaption></figcaption></figure>

### ChangeCurrentExperience

```cpp
UFUNCTION(BlueprintCallable, Category = "Experience")
void ChangeCurrentExperience(FPrimaryAssetId ExperienceId);
```

Starts the experience loading process. **Can only be called once.**

### IsExperienceLoaded

```cpp
UFUNCTION(BlueprintPure, Category = "Experience")
bool IsExperienceLoaded() const;
```

### GetCurrentExperience

```cpp
UFUNCTION(BlueprintPure, Category = "Experience")
const UModularExperienceDefinition* GetCurrentExperience() const;
```

***

## Experience Definition (Blueprint API)

### Get Action By Class

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FonLKXiFSfWhPwnTpoIxz%2Fimage.png?alt=media&amp;token=43140922-82d7-4adc-920e-189a24bb5cbf" alt=""><figcaption></figcaption></figure>

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

Returns the first action of the specified class. Thanks to `DeterminesOutputType`, there is no need to cast the output.

***

## User Facing Experience (Blueprint API)

### Get Facing Action By Class

<figure><img src="https://4216330531-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsGXprPiDJ68FN8HnOaN%2Fuploads%2FUDzXH7a2WmOTAft8dboU%2Fimage.png?alt=media&amp;token=0ae5e614-62b7-4e6a-8379-861dfe7badb8" alt=""><figcaption></figcaption></figure>

```cpp
UFUNCTION(BlueprintPure, DisplayName = "Get Facing Action By Class",
          meta = (DeterminesOutputType = "ActionClass"))
UMES_FacingAction* GetFacingActionByClass(TSubclassOf<UMES_FacingAction> ActionClass) const;
```

***

## Typical Blueprint Flows

{% stepper %}
{% step %}

### Opening an Experience from Menu

```
[Button Click]
  └── Open User Facing Experience (By ID)
        ├── ExperienceId: "MES_UserFacingExperience:UFE_TeamDeathmatch"
        ├── bServerTravel: false
        ├── OnLoaded → [Log: "Traveling..."]
        └── OnFailed → [Show Error Widget]
```

{% endstep %}

{% step %}

### Showing UI When Experience Loads

```
[Actor BeginPlay]
  └── Wait For Experience Ready
        └── OnReady(Experience)
              └── Get Action By Class (UMyUIAction)
                    └── [Create HUD widget]
```

{% endstep %}

{% step %}

### Menu Listing All Experiences

```
[Widget Construct]
  └── Get All User Facing Experiences
        └── [For Each Experience]
              └── Get Facing Action By Class (DisplayInfo)
                    └── [Create list item: Title, Thumbnail, Description]
```

{% endstep %}
{% endstepper %}
