How-To: Share Actions with an Action Set

Goal: define a bundle of actions once and reuse it across several experiences.

Prerequisites
Quick Start step 3 - you have at least one UCrimsonExperienceDefinition.

Most modes share most of their setup: the same HUD, the same inventory wiring, the same input. An action set holds that shared block so a new mode is the shared set plus its differences, instead of a copy that drifts.

1. Create the action set

UCrimsonExperienceActionSet is NotBlueprintable - create it as a Data Asset (right-click -> Miscellaneous -> Data Asset -> CrimsonExperienceActionSet), unlike the experience definition which is a Blueprint class.

PropertyWhat to put in it
ActionsInstanced UGameFeatureActions. This is the shared block.
GameFeaturesToEnablePlugins these actions need. Merged with the experience's own list.
Verify
The asset saves. A null entry in Actions fails data validation - remove the empty row rather than leaving it.

2. Reference it from an experience

Add the asset to the experience's ActionSets array. Actions run experience-first, then each action set in array order.

Verify
Play In Editor: whatever the shared actions do now happens for this experience too, with no change to its own Actions array.

3. Know what belongs where

Put it in...When
The experience's ActionsOnly this mode needs it.
An action setTwo or more modes need it, or it is a coherent feature block you would name.
A Game Feature pluginIt ships content as well as actions, and should be activatable on its own.
Actions come from other plugins
This plugin ships only UCrimsonGameFeatureAction_SplitscreenConfig. Actions like Add Inventory, Add Teams and Add Abilities are shipped by the plugins that own those systems, and appear in the picker when those plugins are installed. See that plugin's own wiki for what each one does.

See also

  • Concept: What an Experience Is
  • How-To: Add a Front-End Experience