Guys I'm new with Unity and I'm getting this error and I can't fix it. Why is the code line not signed??
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Graphs.Edge.WakeUp () (at <b82d8d0a349d4d70807c2fc5746a710f>:0)
UnityEditor.Graphs.Graph.DoWakeUpEdges (System.Collections.Generic.List`1[T] inEdges, System.Collections.Generic.List`1[T] ok, System.Collections.Generic.List`1[T] error, System.Boolean inEdgesUsedToBeValid) (at <b82d8d0a349d4d70807c2fc5746a710f>:0)
UnityEditor.Graphs.Graph.WakeUpEdges (System.Boolean clearSlotEdges) (at <b82d8d0a349d4d70807c2fc5746a710f>:0)
UnityEditor.Graphs.Graph.WakeUp (System.Boolean force) (at <b82d8d0a349d4d70807c2fc5746a710f>:0)
UnityEditor.Graphs.Graph.WakeUp () (at <b82d8d0a349d4d70807c2fc5746a710f>:0)
UnityEditor.Graphs.Graph.OnEnable () (at <b82d8d0a349d4d70807c2fc5746a710f>:0)
CodePudding user response:
Try closing and reopening unity.
Found a similar forum post here which states:
This is an error in Unity's code, which is located in UnityEditor.Graphs.DLL.
it seems to occur most frequently when deleting and recreating animator controllers that don't have any transitions.
CodePudding user response:
The reason for this error may be that the instantiation has been written in the start() method, one class calls another class, and the variables in both classes need to be instantiated, then when class A is used to call class B, class B The variables in class B may not have been instantiated, resulting in the return value of the variables in class B being null. The solution is to put all the first instantiations in the Awake() method, and finally the problem is solved.