Reply To: Passing variables to dynamic subtrees

NodeCanvas Forums Support Passing variables to dynamic subtrees Reply To: Passing variables to dynamic subtrees

#14999
karolstola
Participant

Passing the value via GameObject blackboard still isn’t the solution I’m looking for, as it doesn’t allow me to crate behaviour trees docoupled from particular blackboard. I’ve managed to achieve something close to what I want by creating my own SubTree node, which searches the subgraph for variables denoted with “$” at the beginning and filling them with values from this level blackboard or special “VariableProvider”. The problem I have with this solution is that it stays completely parallel to the built-in subtree implementation, thus is liable to desynchronization with the base code after an NodeCanvas update. With some minor refactoring on your side it would be possible to inherit from SubTree and override some virtual methods. Please find my code attached.