UBlackboardComponent::PauseObserverNotifications
#include "BehaviorTree/BlackboardComponent.h"
Access: public
Description
Suspends dispatch of blackboard change notifications; any key changes made while paused are queued rather than immediately broadcast to observers.
Caveats & Gotchas
- • Must be paired with a later call to ResumeObserverNotifications, otherwise queued key changes never notify observers (and behavior tree decorators won't re-evaluate).
- • Useful when performing a batch of SetValue calls where you only want observers to react once, after the whole batch completes.
Signature
void PauseObserverNotifications() Return Type
void Example
Batch key updates without spamming observers C++
BlackboardComp->PauseObserverNotifications();
BlackboardComp->SetValueAsFloat(TEXT("Health"), 50.f);
BlackboardComp->SetValueAsBool(TEXT("IsAlerted"), true);
BlackboardComp->ResumeObserverNotifications(true); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?