- Home /
Project window bugged - NullReferenceException
I just got this, from out of the blue lol
It happens when I go Right click | Create | MonoBehaviour
Tried closing/reopening the window and restarting unity, didn't help. Restarting Unity does get the window back however, but I still get the error when I create a script file...
It's not just a NullRefExc, it will even prevent scripts from compiling...
Any ideas what to do here? I tried clearing EditorPrefs
, no dice.
Using Unity 4.3.3f1 if it helps.
Thanks for any help.
ERROR:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.AssetsTreeViewGUI.SyncFakeItem () (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/GUI/TreeView/AssetsTreeViewGUI.cs:77)
UnityEditor.TreeViewGUI.BeginRowGUI () (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/GUI/TreeView/TreeViewGUI.cs:114)
UnityEditor.AssetsTreeViewGUI.BeginRowGUI () (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/GUI/TreeView/AssetsTreeViewGUI.cs:28)
UnityEditor.TreeView.OnGUI (Rect rect, Int32 keyboardControlID) (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/GUI/TreeView/TreeView.cs:384)
UnityEditor.ProjectBrowser.OnGUI () (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/ProjectBrowser.cs:1712)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
EDIT:
It seems that the error not just happens when I create a script, but just create anything really from the Create
context menu... :/
You ventured too deep into Unity and now you broke it.
Have you taken a peek into UnityEditor to see what those methods, namely SyncFakeItem does?
Lol that makes sense. No I haven't. Because now I can't even get into Unity, see. :/
Answer by vexe · Mar 03, 2014 at 10:57 AM
Problem solved! Removed EVERY Unity trace from my system (prefs, registry, files, etc) - Downloaded a fresh installed and reinstalled. Back to work.
EDIT:
So after I re-installed and ran unity successfully, I still got the same error when I create something! BUT GUESS WHAT? - if I change the project window layout to two columns, I won't get any problems! - I seem to get that error when I have a single column! No idea why.
EDIT:
For some reason, that was only happening in that certain project, I moved into a new one and everything's nice and cozy now :)
Answer by NaoyaKurihara · Mar 24, 2014 at 03:00 PM
I faced up to similar case, and resolved. Right click on project tree, "Reimport All"
Your answer
