Navigation
API > API/Plugins > API/Plugins/GameplayBehaviorsModule
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UGameplayBehavior
- UGameplayBehavior_AnimationBased
- UGameplayBehavior_BehaviorTree
References
| Module | GameplayBehaviorsModule |
| Header | /Engine/Plugins/Experimental/GameplayBehaviors/Source/GameplayBehaviorsModule/Public/GameplayBehavior.h |
| Include | #include "GameplayBehavior.h" |
Syntax
UCLASS&40;Abstract, Blueprintable, BlueprintType&41;
class UGameplayBehavior :
public UObject,
public IGameplayTaskOwnerInterface
Variables
| Type | Name | Description | |
|---|---|---|---|
| union UGameplayBehavior::@15215 | @15216 | ||
| FGameplayTag | ActionTag | Tag identifying behavior this class represents | |
| uint32: 1 | bFinishedCharacter | ||
| uint32: 1 | bFinishedGeneric | ||
| uint32: 1 | bFinishedPawn | ||
| uint32: 1 | bTransientIsActive | ||
| uint32: 1 | bTransientIsEnding | ||
| uint32: 1 | bTransientIsTriggering | ||
| uint32: 1 | bTriggerCharacter | ||
| uint32: 1 | bTriggerGeneric | ||
| uint32: 1 | bTriggerPawn | ||
| EGameplayBehaviorInstantiationPolicy | InstantiationPolicy | ||
| FOnGameplayBehaviorFinished | OnBehaviorFinished | Note that it's not going to be called if the behavior finishes as part of Trigger call | |
| TArray< TObjectPtr< AActor > > | RelevantActors | It's up to the behavior implementation to decide how to use these actors. | |
| TObjectPtr< AActor > | TransientAvatar | Used mostly as world context for IGameplayTaskOwnerInterface function. | |
| uint32 | TransientProps | ||
| TObjectPtr< AActor > | TransientSmartObjectOwner | SmartObject Actor Owner, can be null |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UGameplayBehavior
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AbortBehavior
(
AActor& Avatar |
||
| void | EndBehavior
(
AActor& Avatar, |
||
| AActor * | GetAvatar () |
||
| TOptional< FVector > | GetDynamicLocation
(
const AActor* InAvatar, |
Can return (it's optional) a dynamic location to use this gameplay behavior | |
| FOnGameplayBehaviorFinished & | |||
| UWorld * | GetWorld () |
||
| bool | IsInstanced
(
const UGameplayBehaviorConfig* Config |
Returns true if this behavior instance is either a non-CDO object or is a CDO, but the class is intended to be used via its instances. | |
| void | K2_AbortBehavior
(
AActor* Avatar |
||
| void | K2_EndBehavior
(
AActor* Avatar |
||
| int32 | K2_GetNextActorIndexInSequence
(
int32 CurrentIndex |
||
| void | K2_OnFinished
(
AActor* Avatar, |
||
| void | K2_OnFinishedCharacter
(
ACharacter* Avatar, |
||
| void | K2_OnFinishedPawn
(
APawn* Avatar, |
||
| void | K2_OnTriggered
(
AActor* Avatar, |
BP API. | |
| void | K2_OnTriggeredCharacter
(
ACharacter* Avatar, |
||
| void | K2_OnTriggeredPawn
(
APawn* Avatar, |
||
| void | K2_TriggerBehavior
(
AActor* Avatar, |
||
| bool | NeedsInstance
(
const UGameplayBehaviorConfig* Config |
||
| void | SetRelevantActors
(
const TArray< AActor* >& InRelevantActors |
||
| bool | Trigger
(
AActor& Avatar, |
Default implementation will trigger the appropriate Blueprint event based on their presence in the script and in the following priority: |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. |
Overridden from IGameplayTaskOwnerInterface
| Type | Name | Description | |
|---|---|---|---|
| AActor * | GetGameplayTaskAvatar
(
const UGameplayTask* Task |
Get "body" of task's owner / default, having location in world (e.g. Owner = AIController, Avatar = Pawn) | |
| uint8 | Get default priority for running a task | ||
| AActor * | GetGameplayTaskOwner
(
const UGameplayTask* Task |
Get owner of a task or default one when task is null | |
| UGameplayTasksComponent * | GetGameplayTasksComponent
(
const UGameplayTask& Task |
Finds tasks component for given GameplayTask, Task.GetGameplayTasksComponent() may not be initialized at this point! | |
| void | OnGameplayTaskActivated
(
UGameplayTask& Task |
Notify called after GameplayTask changes state to Active (initial activation or resuming) | |
| void | OnGameplayTaskDeactivated
(
UGameplayTask& Task |
Notify called after GameplayTask changes state from Active (finishing or pausing) |