RealDocs

UBTTaskNode::FinishLatentAbort

function AIModule Since 4.0
#include "BehaviorTree/BTTaskNode.h"
Access: public Specifiers: const

Description

Call this to signal that a task previously returned InProgress from AbortTask has finished cleaning up and the tree can continue evaluation.

Caveats & Gotchas

  • Only valid to call after AbortTask returned InProgress; the tree stays blocked until this is called if the abort was latent.
  • Always resolves to Aborted — there is no result parameter, unlike FinishLatentTask.
  • Forgetting to call this after a latent AbortTask permanently stalls tree evaluation for that AI, which is a common source of frozen behavior trees.

Signature

void FinishLatentAbort(UBehaviorTreeComponent& OwnerComp) const;

Parameters

Name Type Description Default
OwnerComp UBehaviorTreeComponent& The behavior tree component to notify that the abort has completed.

Return Type

void

Example

Complete a latent abort C++
EBTNodeResult::Type UMyTask::AbortTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
{
	CancelPendingAsyncWork();
	FinishLatentAbort(OwnerComp);
	return EBTNodeResult::InProgress;
}

Tags

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.