UBTTaskNode::WrappedTickTask
#include "BehaviorTree/BTTaskNode.h"
Access: public
Specifiers: const
Description
Internal wrapper the runtime calls to invoke TickTask on an instanced node, but only if the task requested ticking. Returns whether it actually did any processing this call.
Caveats & Gotchas
- • Only calls through to TickTask if bNotifyTick is true, which requires calling INIT_TASK_NODE_NOTIFY_FLAGS in the constructor after overriding TickTask.
- • Not intended to be called or overridden directly; override TickTask instead.
- • Returns false when skipped due to interval throttling, so callers checking the return value shouldn't assume every call performed work.
Signature
bool WrappedTickTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds, float& NextNeededDeltaTime) const; Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| OwnerComp | UBehaviorTreeComponent& | The behavior tree component driving execution. | — |
| NodeMemory | uint8* | Pointer to this node's instance memory block. | — |
| DeltaSeconds | float | Delta time since the last call. | — |
| NextNeededDeltaTime | float& | Out parameter — the node can reduce this to request a shorter interval before its next tick. | — |
Return Type
bool Example
Enable per-tick behavior on a task C++
UMyTask::UMyTask(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
INIT_TASK_NODE_NOTIFY_FLAGS();
}
void UMyTask::TickTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds)
{
// Called via WrappedTickTask() by the BT runtime each tick
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?