GameFeatures
Last updated
Last updated
The Game Features and Modular Gameplay plugins help developers create standalone features for their projects. Building features with these plugins offers several benefits, including keeping your project's codebase clean and readable, and avoiding accidental interactions or dependencies between unrelated features. This is particularly important when developing live products that change their feature sets over time. Official Documentation
By default, there are four game features action
available for you.
Add Cheats
Action extend the Cheat Manager, creating new "cheat codes" or extending existing ones. Cheat codes are helpful for debugging, and are automatically removed from shipping builds. The ~ (tilde) key opens the console where you can enter these codes while running your project.
Add Components
Actions take a list of Actor subclasses and add a set of Components to them on an opt-in basis. This is the most common way to use the Game Features and Modular Gameplay plugins, since Components are well-suited to encapsulating a wide range of behaviors.
Add Data Registry
Actions add one or more Data Registries to the project. Data Registries are efficient places to store and retrieve globally-registered data.
Add Data Registry Source
Actions add one or more Data Tables to existing Data
In CommonGAS, we provided you GameFeatureAction for GameplayAbilitySystem taken from ValleyOfTheAncientDemo and LyraGameSample
Add Abilities
Add gameplay abilities and gameplay effects when enabled and remove gameplay abilities and gameplay effects when disabled
Add InputMappingContext
Add an InputMappingContext when enabled and remove an InputMappingContext when disabled
GameFeatureAction Add Abilities
responsibles for granting abilities and gameplay effects to actors of a specified type when a game feature is enabled and removing abilities and gameplay effects when a game features is disabled.
Granted Abilities
Applying a gameplay ability with an input action to apply with specified actor
Granted Attribute
Applying a attribute set with an data table to initialize gameplay attributes with specified actor
Ability Type
UGameplayAbility to apply
Input Action
UInputAction to apply
Attribute Set Type
UAttributeSet to grant
Initialization Data
Data table reference to initialize attributes with
AddInputMappingContext
adds InputMappingContext
to local players' EnhancedInput system when a game feature is enabled and remove InputMappingContext
when a game feature is disabled.
AddInputMappingContext
also work in tandem with Add Abilities
game feature action when an Ability is granted alongside an Input Action
Input Mapping
Input Mapping Context to apply
Priority
Higher priority InputMappingContext will be prioritized instead of lower priority Input Mapping Context