Blackboard Keys on C++

To be 100% accurate, in this particular example it should be:



UBlackboardComponent* MyBlackboard = OwnerComp.GetBlackboardComponent();
MyBlackboard->ClearValue(**MyBlackboardKey**.SelectedKeyName);
MyBlackboard->GetValueAsBool(**MyBlackboardKey**.SelectedKeyName);
MyBlackboard->SetValueAsBool(**MyBlackboardKey**.SelectedKeyName, false);


The variable “Key” appeared out of nowhere and might be misleading.

Also, you should declare the key as **public **and with below property to make it editable in the editor:


UPROPERTY(EditAnywhere)
FBlackboardKeySelector MyBlackboardKey;