I have 2 variables setup in my behavior tree, isTireScreeching and isBraking:
On my action I can see both of these fields getting updated when the action is running. However in my external mono behaviors while trying to access them, the value is always false via the tree lookup:
Or via the Variable Synchronizer which looks to be a lot cleaner and ideal.
Any idea's?
EDIT:
I just noticed that, I have the values assigned to the variables in the inspector for my action, but when I run the game, these change back to check boxes, so it seems like the reference is getting broken?
How do I fix this?
On my action I can see both of these fields getting updated when the action is running. However in my external mono behaviors while trying to access them, the value is always false via the tree lookup:
Code:
bool isBraking =
((SharedBool)movementTree.GetVariable(Constants.KEY_IS_BRAKING)).Value;
Or via the Variable Synchronizer which looks to be a lot cleaner and ideal.
Any idea's?
EDIT:
I just noticed that, I have the values assigned to the variables in the inspector for my action, but when I run the game, these change back to check boxes, so it seems like the reference is getting broken?
How do I fix this?
Last edited: