Hello. I am wondering the best way to get and store references to characters/objects in a behavior tree. I suppose I could either grab them in the AI Controller or Task and assign them. But my question then is… how do I retrieve the reference?
Or is it more efficient to just cast for references every time in each task? There is the node “Get Blackboard value as object” but I can’t assign it to a variable of the object type I need it to be.
Get Blackboard Value as Actor, or any other supported type to get a value from a blackboard key
If your variable is a specific type, then you need to cast. As a QOL tip, in the editor preferences you can find the option to auto cast connections, so if you drag from the return pin of the get blackboard value as object/actor and try to connect that to your variable, then it will automatically add a cast node in between