wellplayed
New member
I just updated a project from Unity 5.5.4f1 to 2019.1.1f1 and am trying to update Behavior Designer 1.5.8 to 1.6.2. I have successfully updated and imported the new version, and made sure all the .asset files are serialized to 1.6.2, but I am getting a NullReferenceException when I load a specific Behavior Tree using a Behavior Tree Reference. I have tried re-importing all and that still doesn't work.
I get the NullReferenceException when I call behavior.EnableBehavior().
Here is the full output:
Thank you in advance for any help!
I get the NullReferenceException when I call behavior.EnableBehavior().
C#:
var behavior = entity.GetComponent<Behavior>();
if(behavior != null) {
behavior.EnableBehavior();
behavior.DisableBehavior();
}
Here is the full output:
Code:
NullReferenceException: Object reference not set to an instance of an object
BinaryDeserialization.LoadTask (BehaviorDesigner.Runtime.TaskSerializationData taskSerializationData, BehaviorDesigner.Runtime.FieldSerializationData fieldSerializationData, System.Collections.Generic.List`1[BehaviorDesigner.Runtime.Tasks.Task]& taskList, BehaviorDesigner.Runtime.BehaviorSource& behaviorSource) (at <8273d6b105784beab3b1f76a8d030c0c>:0)
BinaryDeserialization.Load (BehaviorDesigner.Runtime.TaskSerializationData taskData, BehaviorDesigner.Runtime.BehaviorSource behaviorSource) (at <8273d6b105784beab3b1f76a8d030c0c>:0)
BehaviorDesigner.Runtime.BehaviorSource.CheckForSerialization (System.Boolean force, BehaviorDesigner.Runtime.BehaviorSource behaviorSource) (at <8273d6b105784beab3b1f76a8d030c0c>:0)
BehaviorDesigner.Runtime.Behavior.CheckForSerialization () (at <8273d6b105784beab3b1f76a8d030c0c>:0)
BehaviorDesigner.Runtime.BehaviorManager.EnableBehavior (BehaviorDesigner.Runtime.Behavior behavior) (at <8273d6b105784beab3b1f76a8d030c0c>:0)
BehaviorDesigner.Runtime.Behavior.EnableBehavior () (at <8273d6b105784beab3b1f76a8d030c0c>:0)
NetworkEnemyFactory.Initialize (UnityEngine.GameObject& instance) (at Assets/[AppAssets]/Scripts/Networking/_Scripts/BOTUScripts/NetworkEnemyFactory.cs:107)
Thank you in advance for any help!