SetVariable Doesn't Exist?

thatoneguy

New member
In the documentation it says to use SetVariable to access variables on a Behavior Tree, however, that method does not exist on that class any longer. What replaced it? Another oddity, BehaviorTree doesn't exist under BehaviorDesigner.Runtime, I could only find it nested under BehaviorManager. See screenshots. Is the documentation really out of date?

1586546190013.png

1586546272707.png
 
There are two behavior tree objects. One under the BehaviorManager, and the other is an independent component with the parent Behavior class. When you call GetComponent<BehaviorTree> you are getting the component version, and this version does have a SetVariable method.
 
Thanks for the reply. For whatever reason that second BehaviorTree you mentioned was non-existant with the BehaviorDesigner.Runtime dll that comes with the initial import from the asset store. I downloaded the source version instead (2019.3) and now I can see it.
 
Top