How-To: Add a Front-End Experience
Goal: make a mode the player can pick from a menu, with a tile and a hosting request.
UCrimsonExperienceDefinition, and the CrimsonUserFacingExperienceDefinition asset type registered in step 2.A UCrimsonUserFacingExperienceDefinition is the presentation of an experience: what the player sees in a mode list, plus which map to travel to. The experience definition says what the session is made of; this says how it is offered.
1. Create the descriptor
It is Blueprintable - create a Blueprint Class from CrimsonUserFacingExperienceDefinition.
| Property | Purpose |
|---|---|
MapID | The map to travel to. Restricted to the Map primary asset type. |
ExperienceID | The experience to load there. Restricted to CrimsonExperienceDefinition. |
TileTitle, TileSubTitle, TileDescription, TileIcon | What the menu shows. |
bShowInFrontEnd | Whether it appears in the list at all. Default true. |
bIsDefaultExperience | Marks the fallback entry. |
MaxPlayerCount | Session size. Default 16. |
bRecordReplay | Start a replay recording with the session. |
ExtraArgs | Extra URL options passed through to the travel. |
LoadingScreen | Styles the travel INTO this experience. |
MapID to the full package path: Map:/<PluginMountPoint>/Maps/L_Name. UCrimsonSession_HostSessionRequest::GetMapName falls back to the primary asset name only when it is a valid long package name; the short Map:L_Name form is not, and hosting fails in the editor with "Can't find asset data for MapID ...".MapID and ExperienceID pickers are populated. An empty picker means step 2 of Quick Start has not been applied, or the editor has not been restarted since.2. List them in a menu
Get All Front End Experiences returns every descriptor with bShowInFrontEnd set - build your tiles from that array. Get Default Front End Experience returns the one flagged bIsDefaultExperience.
3. Host the session
The descriptor exposes everything a session request needs: MapID, MaxPlayerCount, GetTravelOptions() (the ExtraArgs plus Experience=<id>) and GetAdvertisementName(). Build your session system's host request from them, call ApplyLoadingScreenPresentation so the loading screen is styled, and travel. (CrimsonCore - requires all Crimson plugins) UCrimsonCoreExperienceStatics::CreateHostingRequestForExperience does exactly this for the suite's session system.
From your descriptor: Get Travel Options, Get Advertisement Name, and the Map ID / Max Player Count variables -> your session system's host call. Call Apply Loading Screen Presentation before it.
See also
- Concept: What an Experience Is
- API Reference -> UCrimsonUserFacingExperienceDefinition for the
LoadingScreenblock that styles the travel - API Reference -
FCrimsonExperienceLoadingScreenRequest::OnRequested(), the channelApplyLoadingScreenPresentationbroadcasts on