Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/GameplayTasks/Classes/GameplayTask.h |
Include |
#include "GameplayTask.h" |
class UGameplayTask :
public UObject,
public IGameplayTaskOwnerInterface
Name | Description | ||
---|---|---|---|
|
uint32: 1 |
bCaresAboutPriority |
|
|
uint32: 1 |
bClaimRequiredResources |
|
|
uint32: 1 |
bIsPausable |
|
|
uint32: 1 |
bIsSimulating |
Am I actually running this as a simulated task. |
|
uint32: 1 |
bOwnedByTasksComponent |
This is set to avoid duplicate calls to task's owner and TasksComponent when both are the same object |
|
uint32: 1 |
bOwnerFinished |
|
|
uint32: 1 |
bSimulatedTask |
Should this task run on simulated clients? This should only be used in rare cases, such as movement tasks. |
|
uint32: 1 |
bTickingTask |
If true, this task will receive TickTask calls from TasksComponent |
|
TObjectPtr< UGa... |
ChildTask |
Child task instance |
|
ClaimedResources |
Resources that are going to be locked when this task gets activated, but are not required to get this task started |
|
|
DebugDescription |
||
|
InstanceName |
This name allows us to find the task later so that we can end it. |
|
|
Priority |
This controls how this task will be treaded in relation to other, already running tasks, provided GameplayTasksComponent is configured to care about priorities (the default behavior) |
|
|
RequiredResources |
Abstract "resource" IDs this task needs available to be able to get activated. |
|
|
ResourceOverlapPolicy |
||
|
TaskOwner |
Task Owner that created us |
|
|
TWeakObjectPtr<... |
TasksComponent |
|
|
TaskState |
You should never access it directly. |
Name | Description | |
---|---|---|
|
UGameplayTask ( |
Name | Description | ||
---|---|---|---|
|
Activate() |
Called to trigger the actual task once the delegates have been set up Note that the default implementation does nothing and you don't have to call it |
|
|
AddClaimedResource ( |
||
|
AddClaimedResource() |
||
|
AddClaimedResourceSet ( |
||
|
AddClaimedResourceSet ( |
||
|
AddRequiredResource() |
||
|
AddRequiredResource ( |
Marks this task as requiring specified resource which has a number of consequences, like task not being able to run if the resource is already taken. |
|
|
AddRequiredResourceSet ( |
||
|
AddRequiredResourceSet ( |
||
|
IGameplayTas... |
ConvertToTaskOwner ( |
|
|
IGameplayTas... |
ConvertToTaskOwner ( |
|
|
EndTask() |
Called explicitly to end the task (usually by the task itself). |
|
|
ExternalCancel() |
Called when the task is asked to cancel from an outside node. |
|
|
ExternalConfirm ( |
Called when the task is asked to confirm from an outside node. |
|
|
GenerateDebugDescription() |
||
|
AActor * |
GetAvatarActor() |
Proper way to get the avatar actor associated with the task owner (usually a pawn, tower, etc) |
|
UGameplayTas... |
GetChildTask() |
|
|
FGameplayRes... |
GetClaimedResources() |
|
|
const FStrin... |
GetDebugDescription() |
|
|
GetDebugString() |
Return debug string describing task |
|
|
UGameplayTas... |
GetGameplayTasksComponent() |
|
|
UGameplayTas... |
GetGameplayTasksComponent() |
|
|
GetInstanceName() |
||
|
AActor * |
GetOwnerActor() |
Proper way to get the owning actor of task owner. |
|
GetPriority() |
||
|
FGameplayRes... |
GetRequiredResources() |
|
|
ETaskResourc... |
GetResourceOverlapPolicy() |
|
|
EGameplayTas... |
GetState() |
|
|
IGameplayTas... |
GetTaskOwner() |
|
|
GetTaskStateName() |
||
|
UWorld * |
GetWorld() |
Helper function for getting UWorld off a task |
|
HasOwnerFinished() |
||
|
InitSimulatedTask ( |
||
|
InitTask ( |
Initailizes the task with the task owner interface instance but does not actviate until Activate() is called |
|
|
IsActive() |
||
|
IsFinished() |
||
|
IsOwnedByTasksComponent() |
||
|
IsPausable() |
||
|
IsPaused() |
||
|
IsSimulatedTask() |
||
|
IsSimulating() |
||
|
IsTickingTask() |
||
|
IsWaitingOnAvatar() |
||
|
IsWaitingOnRemotePlayerdata() |
||
|
T * |
NewTask ( |
|
|
T * |
NewTask ( |
|
|
T * |
NewTask |
Helper function for instantiating and initializing a new task |
|
T * |
NewTask |
|
|
T * |
NewTaskUninitialized() |
Added for consistency with NewTask, but to indicate that a task requires manual call to InitTask This path is used to manually configure some aspects of the task, like Priority |
|
OnDestroy ( |
End and CleanUp the task - may be called by the task itself or by the task owner if the owner is ending. |
|
|
Pause() |
Protected by design. Not meant to be called outside from GameplayTaskComponent mechanics |
|
|
ReadyForActivation() |
Called to trigger the actual task once the delegates have been set up |
|
|
RequiresPriorityOrResourceManagement() |
||
|
Resume() |
||
|
TaskOwnerEnded() |
Called when task owner has "ended" (before the task ends) kills the task. Calls OnDestroy. |
|
|
TickTask ( |
Tick function for this task, if bTickingTask == true |
Name | Description | ||
---|---|---|---|
|
IsSupportedForNetworking() |
IsSupportedForNetworking means an object can be referenced over the network |
Name | Description | ||
---|---|---|---|
|
AActor * |
GetGameplayTaskAvatar ( |
Get "body" of task's owner / default, having location in world (e.g. Owner = AIController, Avatar = Pawn) |
|
GetGameplayTaskDefaultPriority() |
Get default priority for running a task |
|
|
AActor * |
GetGameplayTaskOwner ( |
Get owner of a task or default one when task is null |
|
UGameplayTas... |
GetGameplayTasksComponent ( |
Finds tasks component for given GameplayTask, Task.GetGameplayTasksComponent() may not be initialized at this point! |
|
OnGameplayTaskDeactivated ( |
Notify called after GameplayTask changes state from Active (finishing or pausing) |
|
|
OnGameplayTaskInitialized ( |
Notify called after GameplayTask finishes initialization (not active yet) |
Name |
Description |
|
---|---|---|
|
FGenericGameplayTaskDelegate |