Navigation
API > API/Plugins > API/Plugins/TargetingSystem
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.
| Name | UTargetingTask |
| Type | class |
| Header File | /Engine/Plugins/Experimental/GameplayTargetingSystem/Source/GameplayTargetingSystem/Public/Tasks/TargetingTask.h |
| Include Path | #include "Tasks/TargetingTask.h" |
Syntax
UCLASS (MinimalAPI, EditInlineNew, Abstract, Const, Meta=(ShowWorldContextPin="true"))
class UTargetingTask : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UTargetingTask
Derived Classes
UTargetingTask derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UTargetingTask
(
const FObjectInitializer& ObjectInitializer |
Tasks/TargetingTask.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CancelAsync() |
Lifecycle function called when the task was cancelled while in the Executing Async state | Tasks/TargetingTask.h | |
virtual void DrawDebug
(
UTargetingSubsystem* TargetingSubsystem, |
Debug Helper Methods | Tasks/TargetingTask.h | |
virtual void Execute
(
const FTargetingRequestHandle& TargetingHandle |
Evaluation function called by derived classes to process the targeting request | Tasks/TargetingTask.h | |
virtual void Init
(
const FTargetingRequestHandle& TargetingHandle |
Lifecycle function called when the task first begins | Tasks/TargetingTask.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UWorld * GetSourceContextWorld
(
const FTargetingRequestHandle& TargetingHandle |
Helper method to get the world from the source context (if possible, returns nullptr if one cannot be found) | Tasks/TargetingTask.h | |
UTargetingSubsystem * GetTargetingSubsystem
(
const FTargetingRequestHandle& TargetingHandle |
Helper method to get the Targeting Subsystem in TargetingTask Blueprint Types | Tasks/TargetingTask.h |
|
ETargetingTaskAsyncState GetTaskAsyncState
(
const FTargetingRequestHandle& TargetingHandle |
Helper method to check if a task is currently executing an async operation | Tasks/TargetingTask.h | |
bool IsAsyncTargetingRequest
(
const FTargetingRequestHandle& TargetingHandle |
Helper method to check if this task is running in an async targeting request | Tasks/TargetingTask.h | |
void SetTaskAsyncState
(
const FTargetingRequestHandle& TargetingHandle, |
Helper method to set the async state for the task (as long as it is the currently running one) | Tasks/TargetingTask.h |