It works for this specific case, but stop working for other cases in my project. I think it creates a issue with variable overrides that are not shared variables.
I solved the issue by not using a SharedVariable. In my case I can set the fixed value in the Behavior Tree Reference task and it works. So, don't worry, take your time to make a proper fix.
Sorry about that. I remember to provide my purchase ID to join the forum, so I thought every member had behavior designer.
I have 2 behavior trees: Lizard and MoveToPosition. The Lizard refers to the enemy that have a NearPositions (relative to that enemy). The MoveToPosition is a generic move...
Thanks for provinding the source code.
I debug here and everything is fine until it reaches these lines, starting at 523 of BehaviorManager.cs
sharedVariable = (overrideField.Value as NamedVariable).value;
sharedVariable.Name = (overrideField.Value as NamedVariable).name;
if...
I did a process of removing nodes to find where the bug happens.
It happens in the External Behavior Tree Node when I set a variable of a custom type that I made:
namespace Josh.AI {
[System.Serializable]
public class SharedTargetPositionFromOpponentList ...
I upgraded from 1.6.1 and I'm using Unity 2018.3.12f.
How could I reproduce it in a fresh project? I create an empty project and add my custom actions, conditions and external behaviour trees and upgrade it? That's gonna be a lot of work, besides my custom actions makes reference to my game code.
After I solved all import issues, the behavior tree is not showing any errors, but when I play I get the following Null Exception:
NullReferenceException: Object reference not set to an instance of an object
BehaviorDesigner.Runtime.BehaviorManager.AddToTaskList...
Now I'm getting this error:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorGUIUtility.TempContent (System.String[] texts) (at C:/buildslave/unity/build/Editor/Mono/EditorGUIUtility.cs:803)
UnityEditor.EditorGUI.Popup (UnityEngine.Rect position...