RealDocs

UBlackboardComponent::GetKeyName

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

Description

Returns the name of the blackboard key with the given ID, as defined on the blackboard data asset.

Caveats & Gotchas

  • Returns NAME_None if the blackboard has no valid asset or the KeyID is out of range.
  • Key IDs are only stable within a single blackboard asset — the same name can map to a different ID on a different asset.

Signature

FName GetKeyName(FBlackboard::FKey KeyID) const

Parameters

Name Type Description Default
KeyID FBlackboard::FKey The numeric key ID to look up.

Return Type

FName

Example

Resolve a key ID back to its name C++
FName KeyName = BlackboardComp->GetKeyName(KeyID);
UE_LOG(LogTemp, Log, TEXT("Key changed: %s"), *KeyName.ToString());

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.