Navigation
API > API/Plugins > API/Plugins/GameplayAbilities
TargetActors are spawned to assist with ability targeting. They are spawned by ability tasks and create/determine the outgoing targeting data passed from one task to another
WARNING: These actors are spawned once per ability activation and in their default form are not very efficient For most games you will need to subclass and heavily modify this actor, or you will want to implement similar functions in a game-specific actor or blueprint to avoid actor spawn costs This class is not well tested by internal games, but it is a useful class to look at to learn how target replication occurs
| Name | AGameplayAbilityTargetActor |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/GameplayAbilityTargetActor.h |
| Include Path | #include "Abilities/GameplayAbilityTargetActor.h" |
Syntax
UCLASS (Blueprintable, Abstract, NotPlaceable, MinimalAPI)
class AGameplayAbilityTargetActor : public AActor
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → AGameplayAbilityTargetActor
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
AGameplayAbilityTargetActor
(
const FObjectInitializer& ObjectInitializer |
Abilities/GameplayAbilityTargetActor.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDebug | bool | Draw the debug information (if applicable) for this targeting actor. | Abilities/GameplayAbilityTargetActor.h |
|
| bDestroyOnConfirmation | bool | Abilities/GameplayAbilityTargetActor.h |
|
|
| CanceledDelegate | FAbilityTargetData | Abilities/GameplayAbilityTargetActor.h | ||
| Filter | FGameplayTargetDataFilterHandle | Abilities/GameplayAbilityTargetActor.h |
|
|
| GenericCancelHandle | FDelegateHandle | Abilities/GameplayAbilityTargetActor.h | ||
| GenericConfirmHandle | FDelegateHandle | Abilities/GameplayAbilityTargetActor.h | ||
| GenericDelegateBoundASC | TObjectPtr< UAbilitySystemComponent > | Abilities/GameplayAbilityTargetActor.h | ||
| MasterPC | APlayerController * | Abilities/GameplayAbilityTargetActor.h | ||
| OwningAbility | TObjectPtr< UGameplayAbility > | Abilities/GameplayAbilityTargetActor.h | ||
| PrimaryPC | TObjectPtr< APlayerController > | Abilities/GameplayAbilityTargetActor.h |
|
|
| ReticleClass | TSubclassOf< AGameplayAbilityWorldReticle > | Reticle that will appear on top of acquired targets. | Abilities/GameplayAbilityTargetActor.h |
|
| ReticleParams | FWorldReticleParameters | Parameters for world reticle. Usage of these parameters is dependent on the reticle. | Abilities/GameplayAbilityTargetActor.h |
|
| ShouldProduceTargetDataOnServer | bool | The TargetData this class produces can be entirely generated on the server. | Abilities/GameplayAbilityTargetActor.h |
|
| SourceActor | TObjectPtr< AActor > | Abilities/GameplayAbilityTargetActor.h |
|
|
| StartLocation | FGameplayAbilityTargetingLocationInfo | Describes where the targeting action starts, usually the player character or a socket on the player character. | Abilities/GameplayAbilityTargetActor.h |
|
| TargetDataReadyDelegate | FAbilityTargetData | Abilities/GameplayAbilityTargetActor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BindToConfirmCancelInputs() |
Abilities/GameplayAbilityTargetActor.h | ||
virtual void CancelTargeting() |
Outside code is saying 'stop everything and just forget about it' | Abilities/GameplayAbilityTargetActor.h | |
virtual void ConfirmTargeting() |
Outside code is saying 'stop and just give me what you have.' Returns true if the ability accepts this and can be forgotten. | Abilities/GameplayAbilityTargetActor.h | |
virtual void ConfirmTargetingAndContinue () |
Requesting targeting data, but not necessarily stopping/destroying the task. | Abilities/GameplayAbilityTargetActor.h | |
virtual bool IsConfirmTargetingAllowed() |
Abilities/GameplayAbilityTargetActor.h | ||
virtual bool OnReplicatedTargetDataReceived
(
FGameplayAbilityTargetDataHandle& Data |
Replicated target data was received from a client. | Abilities/GameplayAbilityTargetActor.h | |
virtual bool ShouldProduceTargetData() |
Abilities/GameplayAbilityTargetActor.h | ||
virtual void StartTargeting
(
UGameplayAbility* Ability |
Initialize and begin targeting logic | Abilities/GameplayAbilityTargetActor.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void EndPlay
(
const EEndPlayReason::Type EndPlayReason |
Abilities/GameplayAbilityTargetActor.h | ||
| Abilities/GameplayAbilityTargetActor.h |