As of v3, there are now two types of Blackboards available within a graph. One of them is the Graph Local Blackboard (which is part of the graph itself), and the second one the gameobject Blackboard (the one attached on the root Behaviour Tree Owner gameobject).
The gameobject Blackboard is propagated down the subtrees in runtime but also in editor if you open a subtree through the parent tree (by double clicking the SubTree node for example). Please note that if you open the subtree asset directly this will not happen.
Another way for passing variables down the subtree, is by mapping the SubTree’s variables to the parent tree’s variables, which can be done through the inspector of the SubTree node for all “exposed public” SubTree variables. Here are the steps of how this works.
Create the variables you need in the SubTree and from their “gear” menu, set them as “Exposed Public”.
In the SubTree node inspector found on the parent tree, you will notice that you are now able to map the variables between parent and sub tree as “write in”, “read out”, or both. The most common one is “write in” which will basically set the subtree’s variable from a parent tree variable when the subtree starts.
Please let me know if the above helps.
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.