Only the first blackboard key gets set

I’m seeing a strange issue with my behavior tree and blackboard. I have two keys in my blackboard, and each get set in a different behavior tree task. However, only one key ever gets set to a value, and it’s always whichever key I created in the blackboard first… When I delete the blackboard and behavior tree, and recreate them, creating the keys in the blackboard in a different order than I did before, then it changes which of the blackboard keys get their value set.

Has anyone seen a similar issue?

No…

Yes, I had a blackboard with keys ObjectKey1, BoolKey and ObjectKey2. I was trying to set the value of ObjectKey2 in a blackboard tree task using “Set Blackboard Value as Object” with the “Key” pin promoted to a variable with the same name as ObjectKey2. But it would set the value of ObjectKey1 instead. Mousing over the key variable in the debugger indicated that the “Selected Key Name” inside the variable’s struct was “ObjectKey1”. So I’m guessing there might be some bug using the variable name to make the key struct or I’m doing it wrong…

Anyway, to fix I set the key name inside the variable’s struct manually by calling Set on my ObjectKey2 variable at the start of the blackboard task. Splitting the input pin so I can type the correct name in “Selected Key Name” and had to attach an empty “Make Array” to “Allowed Types”. Now it sets the correct value on the blackboard.

Pics

303739-blackboardkey1.png

303740-blackboardkey2-edit.png

I have the same issue, @anonymous_user_b291e62b did you manage to figure out what was wrong ?

I have figured out the issue, the Blackboard key must be set to public inside the Task, after which you will be able to see it in the Behavior Tree interface & able to associate it with the actual blackboard key.