Reputation: 191
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)
Upvotes: 2
Views: 7645
Reputation: 11
In my case, the exact error occured because something went wrong with the Animator tab and it can't draw anything, so you can try closing the Animator tab and re-opening it again. Closing Unity also works but it would fix everything instead of only the root problem.
Worked for me btw.
Upvotes: 0
Reputation: 11
You can try using the debug log to check if you are referencing a valid instance of the object. In my experience using a private instance instead of public(which is allowed, provided you make it a serialzed field) was causing the issue. In your C# script either do something like this or make the field public:
[SerializedField]
private Rigidbody2D mybody;
But in most cases it seems this error comes up after you've deleted a game object either from the hierachy or project tabs. In which case, restarting Unity as mentioned here should solve it
Upvotes: 0
Reputation: 772
For example, the empty place is: you write it in the code but you don't have it in Unity, or you mount it wrong in Unity; you write some values in the code but don't assign them a value, resulting in an empty report; Button is specified in the code The function of the Button, but forgot to bind the Button in Unity; the naming in the code is not consistent with the naming in Unity; and a series of problems will lead to an empty report. After the empty report, you must carefully check whether there is any empty space in the code. value, whether there is a problem with Unity being mounted, and a series of details.
Upvotes: 0
Reputation: 4591
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.
Upvotes: 4