Max Nielsen
Member
I am trying to override the GetExternalBehaviors() to dynamically decide which external tree to load/unload at runtime. However I get the following error:
The only thing I do is add the task to my tree and assign a reference to an external behaviour tree, and it triggers this error and my whole tree dissapears.
Code:
I am not sure how to use this tbh since there are no samples so Im just guessing but cant even start testing due to this error.
MissingMethodException: Default constructor not found for type BehaviorDesigner.Runtime.ExternalBehavior[]
System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) (at <9577ac7a62ef43179789031239ba8798>:0)
System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) (at <9577ac7a62ef43179789031239ba8798>:0)
System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) (at <9577ac7a62ef43179789031239ba8798>:0)
BehaviorDesigner.Runtime.TaskUtility.CreateInstance (System.Type t) (at <58623c9461324266a5b7839460bb9d26>:0)
BehaviorDesigner.Runtime.JSONDeserialization.ValueToObject (BehaviorDesigner.Runtime.Tasks.Task task, System.Type type, System.Object obj, BehaviorDesigner.Runtime.IVariableSource variableSource, System.Collections.Generic.List`1[T] unityObjects) (at <58623c9461324266a5b7839460bb9d26>:0)
BehaviorDesigner.Runtime.JSONDeserialization.DeserializeObject (BehaviorDesigner.Runtime.Tasks.Task task, System.Object obj, System.Collections.Generic.Dictionary`2[TKey,TValue] dict, BehaviorDesigner.Runtime.IVariableSource variableSource, System.Collections.Generic.List`1[T] unityObjects) (at <58623c9461324266a5b7839460bb9d26>:0)
BehaviorDesigner.Runtime.JSONDeserialization.DeserializeTask (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Collections.Generic.Dictionary`2[TKey,TValue] dict, System.Collections.Generic.Dictionary`2[System.Int32,BehaviorDesigner.Runtime.Tasks.Task]& IDtoTask, System.Collections.Generic.List`1[T] unityObjects) (at <58623c9461324266a5b7839460bb9d26>:0)
BehaviorDesigner.Runtime.JSONDeserialization.Load (BehaviorDesigner.Runtime.TaskSerializationData taskData, BehaviorDesigner.Runtime.BehaviorSource behaviorSource) (at <58623c9461324266a5b7839460bb9d26>:0)
BehaviorDesigner.Runtime.BehaviorSource.CheckForSerialization (System.Boolean force, BehaviorDesigner.Runtime.BehaviorSource behaviorSource) (at <58623c9461324266a5b7839460bb9d26>:0)
BehaviorDesigner.Editor.GraphDesigner.Load (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean loadPrevBehavior, UnityEngine.Vector2 nodePosition) (at <d4f1a3aa6f1a495496d6efce8625ce9a>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.LoadBehavior (BehaviorDesigner.Runtime.BehaviorSource behaviorSource, System.Boolean loadPrevBehavior, System.Boolean inspectorLoad) (at <d4f1a3aa6f1a495496d6efce8625ce9a>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.ReloadPreviousBehavior () (at <d4f1a3aa6f1a495496d6efce8625ce9a>:0)
BehaviorDesigner.Editor.BehaviorDesignerWindow.OnFocus () (at <d4f1a3aa6f1a495496d6efce8625ce9a>:0)
UnityEditor.HostView.OnFocus () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
The only thing I do is add the task to my tree and assign a reference to an external behaviour tree, and it triggers this error and my whole tree dissapears.
Code:
I am not sure how to use this tbh since there are no samples so Im just guessing but cant even start testing due to this error.