+1
Fixed

Object reference not set to an instance of an object

赵西瓜 6 months ago in Behavior updated by Marti (Lead Developer) 5 months ago 4

NullReferenceException: Object reference not set to an instance of an object
GameCreator.Core.MultiSubEditor`2[TEditor,TTarget].UpdateSubEditors (TTarget[] subInstances) (at Assets/Plugins/GameCreator/Core/Editor/Extensions/MultiSubEditor.cs:30)
GameCreator.Behavior.NodeEditor.ActionsAvailable () (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:691)
GameCreator.Behavior.NodeEditor.GetBodyHeight () (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:307)
GameCreator.Behavior.NodeEditor.GetNodeHeight () (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:597)
GameCreator.Behavior.NodeEditor.GetNodeRect (GameCreator.Behavior.BehaviorWindow window, GameCreator.Behavior.Node node) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:656)
GameCreator.Behavior.NodeEditor.GetNodeInputRect (GameCreator.Behavior.BehaviorWindow window, GameCreator.Behavior.Node node) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:666)
GameCreator.Behavior.NodeEditor.PaintNodeOutputConnections (GameCreator.Behavior.BehaviorWindow window) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:637)
GameCreator.Behavior.NodeEditor.PaintNode (GameCreator.Behavior.BehaviorWindow window) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/Nodes/NodeEditor.cs:428)
GameCreator.Behavior.BehaviorWindow.PaintNodes () (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/BehaviorWindow.cs:160)
GameCreator.Behavior.BehaviorWindow.OnGUI () (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/BehaviorWindow.cs:108)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <9a184ab867bb42c296d20ace04f48df3>:0)
UnityEditor.HostView.Invoke (System.String methodName) (at <9a184ab867bb42c296d20ace04f48df3>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <9a184ab867bb42c296d20ace04f48df3>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <9a184ab867bb42c296d20ace04f48df3>:0)
UnityEditor.DockArea.OldOnGUI () (at <9a184ab867bb42c296d20ace04f48df3>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Boolean canAffectFocus) (at <57fa7f4ad1c34ed185465e0a9f71c244>:0)
UnityEditor.AssetDatabase:SaveAssets()
GameCreator.Behavior.BehaviorGraphEditor:CreateNode(Node) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/BehaviorGraphEditor.cs:233)
GameCreator.Behavior.BehaviorGraphEditor:CreateTask(Object) (at Assets/Plugins/GameCreator/Behavior/Editor/BehaviorTree/BehaviorGraphEditor.cs:171)
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)

Unity version:
Game Creator version:

I think you should include the unity and game creator version.
I have the exact error like this in Unity 2019.3.0f6 with Game Creator version 1.1.5

Unity version:20193.3f1

Game Creator version:1.15


I have no way to use Behavior properly


Under review

I'm opening ticket with the tracelog you added (thanks!).


Despite this, we strongly recommend using Unity 2018.4 LTS. 2019.3 has been somewhat unstable since it was released and we can only provide official support for the long-term stable version (Unity LTS).


If you encounter the same issue with Unity 2018.4, please let us know too.

+1
Fixed

Hi. I'm closing this issue, since we identified a bug that might have provoked this. We'll be updating the Behavior module in the following days with this fix. If the issue reappears after updating, feel free to reopen this thread.