I forgot to reinstall "BehaviorDesignerAnimalController.unitypackage" back, for inspector BDPro3.0.1 again.

fables alive

New member
As seen in the screenshot, in BD Pro 2 I had multiple BDTree components on the same object to test different trees. No issues at all back then.
After upgrading to BD Pro 3, I’m getting a NullReferenceException. In the Inspector, only the top BDTree’s properties are showing up. If I move the others to the top, their properties appear too.
I’m still getting the null ref error in v3. Maybe putting the Tree component at the very top will fix it, but I haven’t tested that yet.
Just reporting this. Thanks!

1775375051059.png
 
Last edited:
What is the entire callstack? It looks like it's an issue with the StackedTask, rather than an issue with multiple trees.
 
also I realized that.. BD Editor not opens.
everything was okay with zero issue in v2. this issues appeared after update v3.0.1( assetstore current published version)

in designtime. when I click the GameObject with BDTree components . here is call stack:
Code:
NullReferenceException: Object reference not set to an instance of an object
Opsive.BehaviorDesigner.Runtime.Tasks.StackedTask.Initialize (Opsive.BehaviorDesigner.Runtime.BehaviorTree behaviorTree, System.UInt16 runtimeIndex) (at ./Packages/com.opsive.behaviordesigner/Runtime/Tasks/StackedTask.cs:206)
Opsive.BehaviorDesigner.Runtime.BehaviorTree.Deserialize (System.Boolean force) (at ./Packages/com.opsive.behaviordesigner/Runtime/BehaviorTree.cs:257)
Opsive.GraphDesigner.Editor.Elements.SharedVariablesElement..ctor (UnityEditor.EditorWindow window, Opsive.GraphDesigner.Runtime.Variables.ISharedVariableContainer container, Opsive.GraphDesigner.Runtime.Variables.SharedVariable+SharingScope scope, System.Boolean restrictEditing) (at <7228064a3d484aae8d9738273f3239dc>:0)
Opsive.BehaviorDesigner.Editor.Inspectors.BehaviorTreeInspector.ShowHeaderElements (UnityEngine.UIElements.VisualElement container) (at <f6217b8d0800471c9cc1a5c9ce1a288c>:0)
Opsive.Shared.Editor.UIElements.UIElementsInspector.DrawElements (UnityEngine.UIElements.VisualElement container, System.Boolean nested) (at <89e5fc87608744ed95a40d7d25c80ce6>:0)
Opsive.Shared.Editor.UIElements.UIElementsInspector.mb () (at <89e5fc87608744ed95a40d7d25c80ce6>:0)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at <3b89d68715d841fd8878d2557b46f30d>:0)
 
Thanks, this is related to an UnknownTask and version 3 trying to give more details but failing. Change line 206 of StackedTask.Initialize to:

Code:
var unknownTask = new UnknownTask(containedNodeTypes != null && i < containedNodeTypes.Length ? containedNodeTypes[i] : null);
 
I was quite busy moving house. Sorry for the delay.
after replacing line 206 BDTreeEditor now able to open...
I was using malbers animal actions extension that I'got from opsive support download page.(BehaviorDesignerAnimalController.unitypackage)
and they seem now UnknownTask
it seems I forgot to reinstall BehaviorDesignerAnimalController and "samples" (that includes CanSeeObject.cs etc ) extensions back.
I'm undecided about whether this thread is useful or not, so the decision to delete it is up to you.
04-09-2026(14;18;52).png

one of error stack is:

Code:
Error: Unable to deserialize task of type .
UnityEngine.Debug:LogError (object)
Opsive.BehaviorDesigner.Runtime.Tasks.StackedTask:Initialize (Opsive.BehaviorDesigner.Runtime.BehaviorTree,uint16) (at ./Packages/com.opsive.behaviordesigner/Runtime/Tasks/StackedTask.cs:209)
Opsive.BehaviorDesigner.Runtime.BehaviorTree:Deserialize (bool) (at ./Packages/com.opsive.behaviordesigner/Runtime/BehaviorTree.cs:257)
Opsive.GraphDesigner.Editor.GraphWindow:LoadGraph (Opsive.GraphDesigner.Runtime.IGraph,bool,bool,Opsive.GraphDesigner.Runtime.AttachedToGraph)
Opsive.GraphDesigner.Editor.GraphWindow:LoadActiveObject (bool,bool)
Opsive.GraphDesigner.Editor.GraphWindow:OnEnable ()
Opsive.BehaviorDesigner.Editor.BehaviorDesignerWindow:OnEnable ()
UnityEditor.EditorWindow:GetWindow<Opsive.BehaviorDesigner.Editor.BehaviorDesignerWindow> (bool,string)
Opsive.BehaviorDesigner.Editor.BehaviorDesignerWindow:ShowWindow ()
Opsive.BehaviorDesigner.Editor.BehaviorDesignerWindow:ShowWindow (Opsive.GraphDesigner.Runtime.IGraph)
Opsive.BehaviorDesigner.Editor.Inspectors.BehaviorTreeInspector/gv:<ShowHeaderElements>b__0 ()
UnityEngine.GUIUtility:ProcessEvent (UnityEngine.EntityId,intptr,bool&)
 
Last edited:
That indicates the tree was serialized with the unknown tasks. It doesn't look like the unknown type was saved due to the error.

The best way to fix this is to revert to a tree where the correct references are saved. You can also right click and replace the task with the correct one.
 
I just installed BehaviorDesignerAnimalController and "Samples" unity packages. and everything worked as expected.
(I accidently deleted all about opsive path before update to v3. so they had gone. after reinstall both package issues disappeared.)
 
Back
Top