Navigation
API > API/Plugins > API/Plugins/TargetingSystem > API/Plugins/TargetingSystem/Tasks
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UTargetingTask
- USimpleTargetingSelectionTask
- UTargetingFilterTask_BasicFilterTemplate
- USimpleTargetingFilterTask
- UTargetingFilterTask_ActorClass
- UTargetingSelectionTask_AOE
- UTargetingSelectionTask_SourceActor
- UTargetingSelectionTask_Trace
- UTargetingSortTask_Base
- USimpleTargetingSortTask
- UTargetingFilterTask_SortByDistance
References
| Module | TargetingSystem |
| Header | /Engine/Plugins/Experimental/GameplayTargetingSystem/Source/GameplayTargetingSystem/Public/Tasks/TargetingTask.h |
| Include | #include "Tasks/TargetingTask.h" |
Syntax
UCLASS (EditInlineNew, Abstract, Const, Meta=(ShowWorldContextPin="true"))
class UTargetingTask : public UObject
Remarks
The base object type that all Targeting Tasks will derive from. The idea is the targeting system will take target requests that are collections of target tasks that will potentially generate/remove and perform operations on sets of targeting results data.
Potential Task Implementations:
Selection Tasks: Target selection tasks would be used to build up a collection of target request results. It is recommend they are added first in the targeting request. Things like ray casts, AOE shapes, actors under a reticle, etc are cases that generally fall under selection.
Filtering Tasks: Target filtering tasks are used to reduce the target result data set to those targets that match a given criteria. Things like actor class, team distance, facing, etc.
Sorting Tasks: Target sorting tasks would be useful to take the set and put them in an order the end user might prefer to make decisions on. Distance (min/max), score rating etc.
Constructors
| Type | Name | Description | |
|---|---|---|---|
UTargetingTask
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | CancelAsync () |
Lifecycle function called when the task was cancelled while in the Executing Async state | |
| void | Execute
(
const FTargetingRequestHandle& TargetingHandle |
Evaluation function called by derived classes to process the targeting request | |
| UWorld * | GetSourceContextWorld
(
const FTargetingRequestHandle& TargetingHandle |
Helper method to get the world from the source context (if possible, returns nullptr if one cannot be found) | |
| UTargetingSubsystem * | GetTargetingSubsystem
(
const FTargetingRequestHandle& TargetingHandle |
Helper method to get the Targeting Subsystem in TargetingTask Blueprint Types | |
| ETargetingTaskAsyncState | GetTaskAsyncState
(
const FTargetingRequestHandle& TargetingHandle |
Helper method to check if a task is currently executing an async operation | |
| void | Init
(
const FTargetingRequestHandle& TargetingHandle |
Lifecycle function called when the task first begins | |
| bool | IsAsyncTargetingRequest
(
const FTargetingRequestHandle& TargetingHandle |
Helper method to check if this task is running in an async targeting request | |
| void | SetTaskAsyncState
(
const FTargetingRequestHandle& TargetingHandle, |
Helper method to set the async state for the task (as long as it is the currently running one) |