RealDocs

UBehaviorTreeComponent::IsAuxNodeActive

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

Description

Returns true if the given auxiliary node (a ticking decorator or service) is currently registered and active on the running tree.

Caveats & Gotchas

  • An overload taking an explicit InstanceIdx also exists (IsAuxNodeActive(AuxNodeTemplate, InstanceIdx)) — use it when checking a node template that could be active in more than one running subtree instance.
  • Auxiliary nodes are registered/unregistered as branches activate and deactivate, so this reflects transient state — it can flip within the same frame as an execution request is processed.

Signature

bool IsAuxNodeActive(const UBTAuxiliaryNode* AuxNode) const

Parameters

Name Type Description Default
AuxNode const UBTAuxiliaryNode* Auxiliary node (decorator with tick/observer behavior, or service) to test.

Return Type

bool

Example

Checking whether a service is currently ticking C++
if (OwnerComp.IsAuxNodeActive(this))
{
    // This service instance is registered and receiving OnTick calls
}

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.