UGameplayTask::OnDestroy

End and CleanUp the task - may be called by the task itself or by the task owner if the owner is ending.

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

UGameplayTask::OnDestroy()

UAbilityTask_WaitConfirm::OnDestroy()

UAbilityTask_WaitGameplayTag::OnDestroy()

UAbilityTask_WaitCancel::OnDestroy()

UAbilityTask_WaitMovementModeChange::OnDestroy()

UAITask_UseSmartObject::OnDestroy()

UAbilityTask_WaitOverlap::OnDestroy()

UAbilityTask_ApplyRootMotionRadialForce::OnDestroy()

UAbilityTask_WaitGameplayEvent::OnDestroy()

UAbilityTask_ApplyRootMotionMoveToForce::OnDestroy()

UAbilityTask_WaitGameplayEffectStackChange::OnDestroy()

UAbilityTask_WaitGameplayEffectRemoved::OnDestroy()

UAbilityTask_WaitGameplayEffectApplied::OnDestroy()

UAbilityTask_WaitAbilityCommit::OnDestroy()

UAbilityTask_Repeat::OnDestroy()

UMockTask_Log::OnDestroy()

UAbilityTask_WaitGameplayEffectBlockedImmunity::OnDestroy()

UAbilityTask_WaitConfirmCancel::OnDestroy()

UAbilityTask_VisualizeTargeting::OnDestroy()

UAbilityTask_WaitAttributeChangeThreshold::OnDestroy()

UAbilityTask_MoveToLocation::OnDestroy()

UAbilityTask_ApplyRootMotionJumpForce::OnDestroy()

UAbilityTask_ApplyRootMotionConstantForce::OnDestroy()

UAbilityTask_WaitAbilityActivate::OnDestroy()

UAbilityTask_ApplyRootMotionMoveToActorForce::OnDestroy()

UAbilityTask_WaitAttributeChangeRatioThreshold::OnDestroy()

UAbilityTask_StartAbilityState::OnDestroy()

UAbilityTask_PlayMontageAndWait::OnDestroy()

UAbilityTask_WaitAttributeChange::OnDestroy()

UAbilityTask_WaitTargetData::OnDestroy()

UAITask_MoveTo::OnDestroy()

UAbilityTask::OnDestroy()

UAbilityTask_WaitConfirm::OnDestroy()

UAbilityTask_WaitGameplayTag::OnDestroy()

UAbilityTask_WaitCancel::OnDestroy()

UAbilityTask_WaitMovementModeChange::OnDestroy()

UAbilityTask_WaitOverlap::OnDestroy()

UAbilityTask_ApplyRootMotionRadialForce::OnDestroy()

UAbilityTask_WaitGameplayEvent::OnDestroy()

UAbilityTask_ApplyRootMotionMoveToForce::OnDestroy()

UAbilityTask_WaitGameplayEffectStackChange::OnDestroy()

UAbilityTask_WaitGameplayEffectRemoved::OnDestroy()

UAbilityTask_WaitGameplayEffectApplied::OnDestroy()

UAbilityTask_WaitAbilityCommit::OnDestroy()

UAbilityTask_Repeat::OnDestroy()

UAbilityTask_WaitGameplayEffectBlockedImmunity::OnDestroy()

UAbilityTask_WaitConfirmCancel::OnDestroy()

UAbilityTask_VisualizeTargeting::OnDestroy()

UAbilityTask_WaitAttributeChangeThreshold::OnDestroy()

UAbilityTask_MoveToLocation::OnDestroy()

UAbilityTask_ApplyRootMotionJumpForce::OnDestroy()

UAbilityTask_ApplyRootMotionConstantForce::OnDestroy()

UAbilityTask_WaitAbilityActivate::OnDestroy()

UAbilityTask_ApplyRootMotionMoveToActorForce::OnDestroy()

UAbilityTask_WaitAttributeChangeRatioThreshold::OnDestroy()

UAbilityTask_StartAbilityState::OnDestroy()

UAbilityTask_PlayMontageAndWait::OnDestroy()

UAbilityTask_WaitAttributeChange::OnDestroy()

UAbilityTask_WaitTargetData::OnDestroy()

References

Module

GameplayTasks

Header

/Engine/Source/Runtime/GameplayTasks/Classes/GameplayTask.h

Include

#include "GameplayTask.h"

Source

/Engine/Source/Runtime/GameplayTasks/Private/GameplayTask.cpp

Syntax

virtual void OnDestroy
(
    bool bInOwnerFinished
)

Remarks

End and CleanUp the task - may be called by the task itself or by the task owner if the owner is ending. IMPORTANT! Do NOT call directly! Call EndTask() or TaskOwnerEnded() IMPORTANT! When overriding this function make sure to call Super::OnDestroy(bOwnerFinished) as the last thing, since the function internally marks the task as "Pending Kill", and this may interfere with internal BP mechanics