Navigation
API > API/Runtime > API/Runtime/GameplayTasks > API/Runtime/GameplayTasks/Tasks
Inheritance Hierarchy
- UObject
- IGameplayTaskOwnerInterface
- UGameplayTask
- UGameplayTask_TimeLimitedExecution
References
| Module | GameplayTasks |
| Header | /Engine/Source/Runtime/GameplayTasks/Classes/Tasks/GameplayTask_TimeLimitedExecution.h |
| Include | #include "Tasks/GameplayTask_TimeLimitedExecution.h" |
Syntax
UCLASS (MinimalAPI)
class UGameplayTask_TimeLimitedExecution : public UGameplayTask
Remarks
Adds time limit for running a child task
- child task needs to be created with UGameplayTask_TimeLimitedExecution passed as TaskOwner
- activations are tied together and when either UGameplayTask_TimeLimitedExecution or child task is activated, other one starts as well
- OnFinished and OnTimeExpired are mutually exclusive
Variables
| Type | Name | Description | |
|---|---|---|---|
| FTaskFinishDelegate | OnFinished | Called when child task finishes execution before time runs out | |
| FTaskFinishDelegate | OnTimeExpired | Called when time runs out |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UGameplayTask_TimeLimitedExecution
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UGameplayTask_TimeLimitedExecution * | LimitExecutionTime
(
IGameplayTaskOwnerInterface& InTaskOwner, |
Overridden from UGameplayTask
| Type | Name | Description | |
|---|---|---|---|
| void | 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 | |
| FString | Return debug string describing task |
Overridden from IGameplayTaskOwnerInterface
| Type | Name | Description | |
|---|---|---|---|
| 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) |