luis-l / BonsaiBehaviourTree

An advanced behaviour tree solution for the Unity game engine
MIT License
417 stars 45 forks source link

NRE when opening a tree in Bonsai Designer #27

Open VectorGCC opened 1 year ago

VectorGCC commented 1 year ago
  1. Create a tree
  2. Create a custom node
  3. Add it to the tree
  4. Remove the custom node

NullReferenceException: Object reference not set to an instance of an object Bonsai.Designer.BonsaiCanvas.CreateNode (Bonsai.Core.BehaviourNode behaviour) (at Assets/3rdParty/BonsaiBehaviourTree/Editor/BonsaiCanvas.cs:49) Bonsai.Designer.BonsaiCanvas.ReconstructEditorNode (Bonsai.Core.BehaviourNode behaviour) (at Assets/3rdParty/BonsaiBehaviourTree/Editor/BonsaiCanvas.cs:198) Bonsai.Designer.BonsaiCanvas.ReconstructEditorNodes (System.Collections.Generic.IEnumerable1[T] behaviours) (at Assets/3rdParty/BonsaiBehaviourTree/Editor/BonsaiCanvas.cs:189) Bonsai.Designer.BonsaiCanvas..ctor (Bonsai.Core.BehaviourTree tree) (at Assets/3rdParty/BonsaiBehaviourTree/Editor/BonsaiCanvas.cs:27) Bonsai.Designer.BonsaiEditor.SetBehaviourTree (Bonsai.Core.BehaviourTree tree) (at Assets/3rdParty/BonsaiBehaviourTree/Editor/BonsaiEditor.cs:360) Bonsai.Designer.BonsaiWindow.BuildCanvas () (at Assets/3rdParty/BonsaiBehaviourTree/Editor/BonsaiWindow.cs:218) Bonsai.Designer.BonsaiWindow.OnEnable () (at Assets/3rdParty/BonsaiBehaviourTree/Editor/BonsaiWindow.cs:61)`

VectorGCC commented 1 year ago

Pull Request https://github.com/luis-l/BonsaiBehaviourTree/pull/34 to fix issue