Hello, I wanted to upgrade the BD version from 1.6.1 to 1.6.2, but our trees have null ref exception in the new version :-o
The exception is when we are Enabling a BD Tree with a subtree in BTReference node. The subtree has a variable called "Position". The parent tree does not contain variable of the same name. The variable in the child tree is linked to a different variable in the parent tree through the variables property of the BTReference node in the tree editor.
The nullRef is in BehaviorManager - AddToTaskList line 541:
behaviorTree.behavior.SetVariable(sharedVariable.Name, sharedVariable);
the shared variable is null, ant the null if propagated from line 528
if (sharedVariable.IsShared) {
sharedVariable = behaviorTree.behavior.GetVariable(sharedVariable.Name); // this returns null
}
The exception is when we are Enabling a BD Tree with a subtree in BTReference node. The subtree has a variable called "Position". The parent tree does not contain variable of the same name. The variable in the child tree is linked to a different variable in the parent tree through the variables property of the BTReference node in the tree editor.
The nullRef is in BehaviorManager - AddToTaskList line 541:
behaviorTree.behavior.SetVariable(sharedVariable.Name, sharedVariable);
the shared variable is null, ant the null if propagated from line 528
if (sharedVariable.IsShared) {
sharedVariable = behaviorTree.behavior.GetVariable(sharedVariable.Name); // this returns null
}