Not working in Unity 2018.3.7f1 when Scripting Runtime use .Net 4.x

DannyWang

New member
Got error:

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.BehaviorSource.GetAllVariables () (at <8273d6b105784beab3b1f76a8d030c0c>:0) BehaviorDesigner.Editor.ExternalBehaviorInspector.DrawInspectorGUI (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean fromInspector, System.Boolean& showVariables) (at <0f49ef0acdbd44f8a5303100d11f8912>:0) BehaviorDesigner.Editor.ExternalBehaviorInspector.OnInspectorGUI () (at <0f49ef0acdbd44f8a5303100d11f8912>:0) UnityEditor.InspectorWindow.DoOnInspectorGUI (System.Boolean rebuildOptimizedGUIBlock, UnityEditor.Editor editor, System.Boolean wasVisible, UnityEngine.Rect& contentRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1625) UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

When I change to .NET 3.5, it works perfectly. Sorry for my poor English.
 
Are you using a recent Behavior Designer version? I've tested it with .net 4 and haven't noticed any issues. If you can list the steps to reproduce from a fresh project that would be great.
 
Hello,

I'm also currently having the same kind of error after upgrading my project to 2019.1 and switching to .Net 4 with the most recent Behavior Designer version. I'm loading my behavior trees at runtime using external behavior.

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.Behavior.DrawTaskGizmos (System.Boolean selected) (at <8273d6b105784beab3b1f76a8d030c0c>:0)
BehaviorDesigner.Runtime.Behavior.OnDrawGizmos () (at <8273d6b105784beab3b1f76a8d030c0c>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Followed by this one :

Code:
ArgumentException: Version string portion was too short or too long.
System.Version+VersionResult.SetFailure (System.Version+ParseFailureKind failure, System.String argument) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Version+VersionResult.SetFailure (System.Version+ParseFailureKind failure) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Version.TryParseVersion (System.String version, System.Version+VersionResult& result) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Version.Parse (System.String input) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Version..ctor (System.String version) (at <1f0c1ef1ad524c38bbc5536809c46b48>: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)
 
I remember that version error from awhile ago. You'll want to first ensure that you are running the latest version of Behavior Designer. From there if you can list the steps to reproduce that would be great.
 
My bad, I did update Behavior Designer to the lastest version but I hadn't done it for the Formations Pack, hence the error.
 
Back
Top