RealDocs

UBTTaskNode::WrappedAbortTask

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

Description

Internal wrapper the behavior tree runtime calls instead of AbortTask directly, resolving instanced nodes before aborting. It is what actually runs when a higher-priority branch interrupts this task.

Caveats & Gotchas

  • Not intended to be called or overridden directly; override AbortTask instead.
  • If AbortTask returns InProgress, the tree waits until FinishLatentAbort is called before continuing evaluation — forgetting that call stalls the whole tree.
  • Like WrappedExecuteTask, template (non-instanced) nodes must treat AbortTask as effectively const since it's shared across AI instances.

Signature

EBTNodeResult::Type WrappedAbortTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const;

Parameters

Name Type Description Default
OwnerComp UBehaviorTreeComponent& The behavior tree component driving execution.
NodeMemory uint8* Pointer to this node's instance memory block.

Return Type

EBTNodeResult::Type

Example

Override the underlying abort instead C++
EBTNodeResult::Type UMyTask::AbortTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
{
	// Called via WrappedAbortTask() by the BT runtime
	return EBTNodeResult::Aborted;
}

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.