- Home /
Internal_DrawMeshNow2 Error
Hey everyone, I'm at a bit of a loss on this. I'll post the stack below, but this started happening in the editor after I reverted a change in one of my custom editor scripts.
Specifically, I had a line that read:
Object[] objects = FindObjectsOfType(typeof(UnityEngine.Object));
Trying to find some missing objects I changed it to:
Object[] objects = Resources.FindObjectsOfTypeAll(typeof(UnityEngine.Object));
This successfully ran, but didn't really accomplish what I wanted so I reverted it back to:
Object[] objects = FindObjectsOfType(typeof(UnityEngine.Object));
This compiles, however, now whenever I select anything in the editor I get the following error:
NullReferenceException
UnityEngine.Graphics.Internal_DrawMeshNow2 (UnityEngine.Mesh mesh, Matrix4x4 matrix, Int32 materialIndex) (at C:/BuildAgent/work/14194e8ce88cdf47/Runtime/ExportGenerated/Editor/Graphics.cs:2335)
UnityEngine.Graphics.DrawMeshNow (UnityEngine.Mesh mesh, Matrix4x4 matrix) (at C:/BuildAgent/work/14194e8ce88cdf47/Runtime/ExportGenerated/Editor/Graphics.cs:2326)
UnityEditor.Handles.ConeCap (Int32 controlID, Vector3 position, Quaternion rotation, Single size) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/MonoGenerated/Editor/EditorHandles.cs:232)
UnityEditor.Handles.ArrowCap (Int32 controlID, Vector3 position, Quaternion rotation, Single size) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/MonoGenerated/Editor/EditorHandles.cs:327)
UnityEditorInternal.Slider1D.Do (Int32 id, Vector3 position, Vector3 direction, Single size, UnityEditor.DrawCapFunction drawFunc, Single snap) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/EditorHandles/Slider1D.cs:84)
UnityEditor.Handles.Slider (Vector3 position, Vector3 direction, Single size, UnityEditor.DrawCapFunction drawFunc, Single snap) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/MonoGenerated/Editor/EditorHandles.cs:93)
UnityEditor.Handles.DoPositionHandle_Internal (Vector3 position, Quaternion rotation) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/EditorHandles/PositionHandle.cs:71)
UnityEditor.Handles.DoPositionHandle (Vector3 position, Quaternion rotation) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/EditorHandles/PositionHandle.cs:61)
UnityEditor.Handles.PositionHandle (Vector3 position, Quaternion rotation) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/MonoGenerated/Editor/EditorHandles.cs:67)
UnityEditor.MoveTool.OnGUI () (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/GUI/BuiltinTools.cs:14)
UnityEditor.SceneView.DefaultHandles () (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/SceneView/SceneView.cs:970)
UnityEditor.SceneView.OnGUI () (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/SceneView/SceneView.cs:722)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
I have tried reverting all my files to an earlier build and it's still happening. Anyone seen this error before? Got any idea what might be going wrong?
Thanks much, -Memige
EDIT Here's a screen shot of what its doing visually in the editor
Answer by Memige · Oct 18, 2012 at 09:50 PM
I am still curious as to where this came from, but restarting the editor seems to have fixed it. I'll save my "Correct answer" for whoever can figure out what was happening, but for anyone that runs into this themselves, try rebooting. [Something I should have tried before posting admittedly]
Your answer
Follow this Question
Related Questions
Odd/Even tag Errors 0 Answers
OnInspectorGUI() Getting Control 2's position in a group with only 2 controls when doing repaint 1 Answer
Unity Package Manager UI Error Socket IO Unity after updating from 2017.3 to 2018.1.0f2 Nodejs 1 Answer
Execute editor window scripts when project errors are present 0 Answers
Socket error editor 1 Answer