Navigation
API > API/Runtime > API/Runtime/GameplayTasks
The core ActorComponent for interfacing with the GameplayAbilities System
| Name | UGameplayTasksComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/GameplayTasks/Classes/GameplayTasksComponent.h |
| Include Path | #include "GameplayTasksComponent.h" |
Syntax
UCLASS (ClassGroup=GameplayTasks,
HideCategories=(Object, LOD, Lighting, Transform, Sockets, TextureStreaming),
EditInlineNew, Meta=(BlueprintSpawnableComponent), MinimalAPI)
class UGameplayTasksComponent :
public UActorComponent ,
public IGameplayTaskOwnerInterface ,
public IVisualLoggerDebugSnapshotInterface
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UGameplayTasksComponent
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IGameplayTaskOwnerInterface
- IVisualLoggerDebugSnapshotInterface
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UGameplayTasksComponent
(
const FObjectInitializer& ObjectInitializer |
GameplayTasksComponent.h |
Structs
| Name | Remarks |
|---|---|
| FEventLock |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| GameplayTaskContainerType | decltype(TickingTasks) | GameplayTasksComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnClaimedResourcesChange | FOnClaimedResourcesChangeSignature | GameplayTasksComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bInEventProcessingInProgress | uint8 | GameplayTasksComponent.h | ||
| EventLockCounter | int32 | GameplayTasksComponent.h | ||
| PreviousOnRepSimulatedTasks | TArray< TWeakObjectPtr< UGameplayTask > > | Previously replicated tasks that run on simulated proxies | GameplayTasksComponent.h | |
| SimulatedTasks | TArray< TObjectPtr< UGameplayTask > > | Tasks that run on simulated proxies | GameplayTasksComponent.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddTaskReadyForActivation
(
UGameplayTask& NewTask |
Processes the task and figures out if it should get triggered instantly or wait based on task's RequiredResources, Priority and ResourceOverlapPolicy | GameplayTasksComponent.h | |
void DescribeSelfToVisLog
(
FVisualLogEntry* Snapshot |
GameplayTasksComponent.h | ||
void EndAllResourceConsumingTasksOwnedBy
(
const IGameplayTaskOwnerInterface& TaskOwner |
GameplayTasksComponent.h | ||
bool FindAllResourceConsumingTasksOwnedBy
(
const IGameplayTaskOwnerInterface& TaskOwner, |
GameplayTasksComponent.h | ||
UGameplayTask * FindResourceConsumingTaskByName
(
const FName TaskInstanceName |
Finds first resource-consuming task of given name | GameplayTasksComponent.h | |
FGameplayResourceSet GetCurrentlyUsedResources() |
GameplayTasksComponent.h | ||
GameplayTaskContainerType::TConstIterator GetKnownTaskIterator() |
GameplayTasksComponent.h | ||
FString GetKnownTasksDescription() |
GameplayTasksComponent.h | ||
GameplayTaskContainerType::TConstIterator GetPriorityQueueIterator() |
GameplayTasksComponent.h | ||
virtual bool GetShouldTick() |
Retrieves information whether this component should be ticking taken current activity into consideration | GameplayTasksComponent.h | |
GameplayTaskContainerType::TConstIterator GetSimulatedTaskIterator() |
GameplayTasksComponent.h | ||
FString GetTasksPriorityQueueDescription() |
GameplayTasksComponent.h | ||
GameplayTaskContainerType::TConstIterator GetTickingTaskIterator() |
GameplayTasksComponent.h | ||
FString GetTickingTasksDescription() |
GameplayTasksComponent.h | ||
bool HasActiveTasks
(
UClass* TaskClass |
GameplayTasksComponent.h | ||
void OnRep_SimulatedTasks() |
GameplayTasksComponent.h | ||
void RemoveResourceConsumingTask
(
UGameplayTask& Task |
GameplayTasksComponent.h | ||
void UpdateShouldTick() |
GameplayTasksComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReadyForReplication() |
GameplayTasksComponent.h | ||
virtual bool ReplicateSubobjects
(
UActorChannel* Channel, |
GameplayTasksComponent.h | ||
virtual void TickComponent
(
float DeltaTime, |
GameplayTasksComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void GetLifetimeReplicatedProps
(
TArray< FLifetimeProperty >& OutLifetimeProps |
GameplayTasksComponent.h |
Overridden from IGameplayTaskOwnerInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual AActor * GetGameplayTaskAvatar
(
const UGameplayTask* Task |
Get "body" of task's owner / default, having location in world (e.g. Owner = AIController, Avatar = Pawn) | GameplayTasksComponent.h | |
virtual AActor * GetGameplayTaskOwner
(
const UGameplayTask* Task |
Get owner of a task or default one when task is null | GameplayTasksComponent.h | |
virtual UGameplayTasksComponent * GetGameplayTasksComponent
(
const UGameplayTask& Task |
Finds tasks component for given GameplayTask, Task.GetGameplayTasksComponent() may not be initialized at this point! | GameplayTasksComponent.h | |
virtual void OnGameplayTaskActivated
(
UGameplayTask& Task |
Notify called after GameplayTask changes state to Active (initial activation or resuming) | GameplayTasksComponent.h | |
virtual void OnGameplayTaskDeactivated
(
UGameplayTask& Task |
Notify called after GameplayTask changes state from Active (finishing or pausing) | GameplayTasksComponent.h |
Overridden from IVisualLoggerDebugSnapshotInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void GrabDebugSnapshot
(
FVisualLogEntry* Snapshot |
GameplayTasksComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AddSimulatedTask
(
UGameplayTask* NewTask |
Add a new simulated task. | GameplayTasksComponent.h | |
const TArray< UGameplayTask * > & GetSimulatedTasks() |
Tasks that run on simulated proxies | GameplayTasksComponent.h | |
void ProcessTaskEvents() |
GameplayTasksComponent.h | ||
void RemoveSimulatedTask
(
UGameplayTask* NewTask |
Remove an existing simulated task | GameplayTasksComponent.h | |
void RequestTicking() |
GameplayTasksComponent.h | ||
void SetCurrentlyClaimedResources
(
FGameplayResourceSet NewClaimedSet |
GameplayTasksComponent.h | ||
void SetSimulatedTasks
(
const TArray< UGameplayTask* >& NewSimulatedTasks |
Remove all current tasks and register the one in the passed array. | GameplayTasksComponent.h | |
void UpdateTaskActivations() |
GameplayTasksComponent.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FString GetTaskStateName
(
EGameplayTaskState Value |
GameplayTasksComponent.h | ||
static EGameplayTaskRunResult K2_RunGameplayTask
(
TScriptInterface< IGameplayTaskOwnerInterface > TaskOwner, |
GameplayTasksComponent.h |
|
|
static EGameplayTaskRunResult RunGameplayTask
(
IGameplayTaskOwnerInterface& TaskOwner, |
GameplayTasksComponent.h |