Hi,
I am trying to upgrade a project from Unity 2017 to Unity 2020 and I am getting the following serialization error when trying to view a behaviour tree in the Unity Editor. I have done a bit of digging and some people have recommended changing scripting backends etc but nothing is working.
I have also found that some people have had success with changing the serialization type to JSON. Is changing the serialization type to JSON done in Unity or Behavior Designer? I can't find such a setting anywhere.
The old setup is: Unity 2017.4.40f1, Windows x86, .NET 3.5, Mono, .NET 2.0 subset
The new setup is: Unity 2020.3.28f1, Windows x86, N/A, Mono, .NET 4.x or .NET Standard 2.0
Edit: Asset Serialization is set to "Force Text" on both versions.
The error is described below:
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 <48f39576acde448686316339e2d9155e>:0)
BinaryDeserialization.Load (BehaviorDesigner.Runtime.TaskSerializationData taskData, BehaviorDesigner.Runtime.BehaviorSource behaviorSource) (at <48f39576acde448686316339e2d9155e>:0)
BehaviorDesigner.Runtime.BehaviorSource.CheckForSerialization (System.Boolean force, BehaviorDesigner.Runtime.BehaviorSource behaviorSource) (at <48f39576acde448686316339e2d9155e>:0)
BehaviorDesigner.Editor.GraphDesigner.Load (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean loadPrevBehavior, UnityEngine.Vector2 nodePosition) (at <b54bf20a11e0465facb3cced279af82b>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.LoadBehavior (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean loadPrevBehavior, System.Boolean inspectorLoad) (at <b54bf20a11e0465facb3cced279af82b>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.LoadBehavior (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean loadPrevBehavior) (at <b54bf20a11e0465facb3cced279af82b>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.BehaviorSelectionCallback (System.Object obj) (at <b54bf20a11e0465facb3cced279af82b>:0)
I am trying to upgrade a project from Unity 2017 to Unity 2020 and I am getting the following serialization error when trying to view a behaviour tree in the Unity Editor. I have done a bit of digging and some people have recommended changing scripting backends etc but nothing is working.
I have also found that some people have had success with changing the serialization type to JSON. Is changing the serialization type to JSON done in Unity or Behavior Designer? I can't find such a setting anywhere.
The old setup is: Unity 2017.4.40f1, Windows x86, .NET 3.5, Mono, .NET 2.0 subset
The new setup is: Unity 2020.3.28f1, Windows x86, N/A, Mono, .NET 4.x or .NET Standard 2.0
Edit: Asset Serialization is set to "Force Text" on both versions.
The error is described below:
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 <48f39576acde448686316339e2d9155e>:0)
BinaryDeserialization.Load (BehaviorDesigner.Runtime.TaskSerializationData taskData, BehaviorDesigner.Runtime.BehaviorSource behaviorSource) (at <48f39576acde448686316339e2d9155e>:0)
BehaviorDesigner.Runtime.BehaviorSource.CheckForSerialization (System.Boolean force, BehaviorDesigner.Runtime.BehaviorSource behaviorSource) (at <48f39576acde448686316339e2d9155e>:0)
BehaviorDesigner.Editor.GraphDesigner.Load (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean loadPrevBehavior, UnityEngine.Vector2 nodePosition) (at <b54bf20a11e0465facb3cced279af82b>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.LoadBehavior (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean loadPrevBehavior, System.Boolean inspectorLoad) (at <b54bf20a11e0465facb3cced279af82b>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.LoadBehavior (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean loadPrevBehavior) (at <b54bf20a11e0465facb3cced279af82b>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.BehaviorSelectionCallback (System.Object obj) (at <b54bf20a11e0465facb3cced279af82b>:0)
Last edited: