A modular system to model different kinds of behaviors AI’s can take.
The main class UGameplayBehavior is used in Smart Objects together with a Gameplay Behavior Definition to define how smart objects are interacted with.
Builtin support includes:
- GameplayBehaviors using BehaviorTrees
- GameplayBehaviors using Animation Montages
The base UGameplayBehavior class can be extended in blueprints or otherwise to create custom behaviors as well.
Gotchas
At least as of Unreal Engine 5.4.2, blueprint Gameplay Behaviors can’t call nodes which require a world context. This seems to be a bug in the implementation of GetWorld in UGameplayBehavior.
You can fix this by creating a C++ subclass of the class and overriding ImplementsGetWorld
and returning true
from it.