RealDocs

UBTTaskNode::ShouldIgnoreRestartSelf

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

Description

Returns whether a pending task search should be discarded if it re-selects this same task while it is already running. Backed by the bIgnoreRestartSelf property.

Caveats & Gotchas

  • Controlled by the editor-exposed bIgnoreRestartSelf property (Category=Task) — there's no separate setter, set the property directly or via a UPROPERTY default.
  • Useful for tasks like 'move to location' where a decorator re-evaluation shouldn't restart an already-in-progress move to the same target.
  • Defined inline in the header, so it's trivial to inline but still requires including BTTaskNode.h rather than a forward declaration.

Signature

bool ShouldIgnoreRestartSelf() const;

Return Type

bool

Example

Check before restarting a task C++
if (TaskNode->ShouldIgnoreRestartSelf())
{
	// Skip discarding the in-progress search for this task
}

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.