UBlackboardComponent::GetBlackboardAsset
#include "BehaviorTree/BlackboardComponent.h"
Access: public
Description
Returns the blackboard data asset currently in use by this component, defining its available keys and their types.
Caveats & Gotchas
- • The preferred way to read the current asset — direct access to the protected BlackboardAsset member is deprecated in favor of this accessor.
- • Can return nullptr before InitializeComponent or InitializeBlackboard has run.
Signature
UBlackboardData* GetBlackboardAsset() const Return Type
UBlackboardData* Example
Check the assigned blackboard asset C++
if (UBlackboardData* Asset = BlackboardComp->GetBlackboardAsset())
{
UE_LOG(LogTemp, Log, TEXT("Using blackboard: %s"), *Asset->GetName());
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?