Hi ,
I am having the same issue as the user above. I have a pretty simple behavior tree:
The services are implemented in c++, and in them I’ve been using the FBlackboardSelector so that I can set teh blackboard key in the behavior tree in the editor. The code I used looks like this:
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = BlackboardKeys)
struct FBlackboardKeySelector TargetPosition_Key;
Like the previous poster, I found that when I used GetSelectedKeyID() to access the blackboard value in c++ I would get a debug value back, because the ID that is being returns is 255. I got around this by using the Key name instead:
OwnerComp.GetBlackboardComponent()->SetValueAsVector(TargetPosition_Key.SelectedKeyName, GoalLocation);
That line works as expected and sets the value as expected. The name also works for getting the value from the blackboard.
My problem comes from the BTTask_MoveTo task. It uses the ID like so:
const FVector TargetLocation = MyBlackboard->GetValue<UBlackboardKeyType_Vector>(BlackboardKey.GetSelectedKeyID());
I assume the ID must be failing here as well because it returns a vector with all max values, which is debug value.
I can see that the blackboard variable is being updated correctly from my code using the key name, but the id seems to be failing in all cases. This is not just for the GoalLocation vector variable either, it seems to be all of the keys, including vectors, objects and floats.
I have no idea what the issue is, so any help is appreciated.
Thanks,