2020 startup errors ReleaseAllScriptCaches/UIelements

Every other time my 2020 (HDRP) project loads I get a load of UIElements related errors

Quite a mess on a simple project - log below, but many more errors continue and you have to restart the editor

Symbol file LoadedFromMemory doesn't match image D:\work\project\Library\PackageCache\com.unity.ext.nunit@1.0.0\net35\unity-custom\nunit.framework.dll
ReleaseAllScriptCaches did not release all script caches!
(Filename: C:\buildslave\unity\build\Runtime/Mono/MonoManager.cpp Line: 1455)

Remaining caches:
    UnityEngine.UIElementsModule:UnityEngine.UIElements:StyleSheet
Native extension for WindowsStandalone target not found
Native extension for WebGL target not found
Refreshing native plugins compatible for Editor in 69.53 ms, found 8 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
NullReferenceException: Object reference not set to an instance of an object
  at UnityEditor.UIElements.UIElementsEditorUtility..cctor () [0x0003d] in <6d0b5326886a4f0e8ed4ea356b37330b>:0
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
  at UnityEditor.UIElements.UIElementsEntryPoint.CreateRoot () [0x00045] in <6d0b5326886a4f0e8ed4ea356b37330b>:0
  at UnityEditor.UIElements.UIElementsEntryPoint.GetRootVisualElement (UnityEditor.EditorWindow window) [0x00011] in <6d0b5326886a4f0e8ed4ea356b37330b>:0
  at UnityEditor.UIElements.DefaultEditorWindowBackend.OnRegisterWindow () [0x0000d] in <6d0b5326886a4f0e8ed4ea356b37330b>:0
  at UnityEditor.UIElements.DefaultEditorWindowBackend.OnCreate (UnityEditor.IWindowModel model) [0x000fe] in <6d0b5326886a4f0e8ed4ea356b37330b>:0
  at UnityEditor.GUIView.set_windowBackend (UnityEditor.IWindowBackend value) [0x0002e] in <6d0b5326886a4f0e8ed4ea356b37330b>:0
  at UnityEditor.GUIView.OnEnable () [0x00008] in <6d0b5326886a4f0e8ed4ea356b37330b>:0
  at UnityEditor.HostView.OnEnable () [0x0001a] in <6d0b5326886a4f0e8ed4ea356b37330b>:0
1 Like

Same (non HDRP or URP )

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <67055f1be3654e2a987254d5437ee5b8>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.EditorToolbar.CreateRoot () (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.EditorToolbar.get_rootVisualElement () (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.Toolbar.PositionChanged (UnityEditor.GUIView view) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.GUIView.SetPosition (UnityEngine.Rect newPos) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.View.set_position (UnityEngine.Rect value) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.TooltipView.Setup (System.String tooltip, UnityEngine.Rect rect, UnityEditor.GUIView hostView) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.TooltipView.Show (System.String tooltip, UnityEngine.Rect rect, UnityEditor.GUIView hostView) (at <67055f1be3654e2a987254d5437ee5b8>:0)

Same on 2D project. The inspector won’t even show.

@andyz @Mal_Duffin did you send a bug report already?

So this eased off, but in general UIElements seemed to be the root of (or maybe just surface of) a lot of errors in 2020, not a good sign. However I have not had consistency to make a bug report and run into other more pressing ones

Same here on a project that was updated directly from 2017 to 2020. UI errors on startup and sometimes when I try to open a window.
Error when I tried to open the Project Settings window:

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <67055f1be3654e2a987254d5437ee5b8>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.EditorToolbar.CreateRoot () (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.EditorToolbar.get_rootVisualElement () (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.Toolbar.PositionChanged (UnityEditor.GUIView view) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.GUIView.SetPosition (UnityEngine.Rect newPos) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.View.set_position (UnityEngine.Rect value) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.MainView.SetPosition (UnityEngine.Rect newPos) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.View.set_position (UnityEngine.Rect value) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.ContainerWindow.OnResize () (at <67055f1be3654e2a987254d5437ee5b8>:0)

I am also having issues on startup, and opening/closing the project reduces the amount of errors randomly but the errors remain the same.

My project has no running codes and yet I have a list of 15 to 24 errors (double line break separating each error message):

ReleaseAllScriptCaches did not release all script caches!

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <67055f1be3654e2a987254d5437ee5b8>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.UIElements.UIElementsEntryPoint.CreateRoot () (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.UIElements.UIElementsEntryPoint.GetRootVisualElement (UnityEditor.EditorWindow window) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnRegisterWindow () (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnCreate (UnityEditor.IWindowModel model) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.GUIView.set_windowBackend (UnityEditor.IWindowBackend value) (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.GUIView.OnEnable () (at <67055f1be3654e2a987254d5437ee5b8>:0)
UnityEditor.HostView.OnEnable () (at <67055f1be3654e2a987254d5437ee5b8>:0)

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UIElements.StyleSheets.StyleSelectorHelper.FastLookup (System.Collections.Generic.IDictionary`2[TKey,TValue] table, System.Collections.Generic.List`1[T] matchedSelectors, UnityEngine.UIElements.StyleMatchingContext context, System.String input, UnityEngine.UIElements.StyleSheets.SelectorMatchRecord& record) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.StyleSheets.StyleSelectorHelper.FindMatches (UnityEngine.UIElements.StyleMatchingContext context, System.Collections.Generic.List`1[T] matchedSelectors) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdaterTraversal.TraverseRecursive (UnityEngine.UIElements.VisualElement element, System.Int32 depth) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.StyleSheets.HierarchyTraversal.Recurse (UnityEngine.UIElements.VisualElement element, System.Int32 depth) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdaterTraversal.TraverseRecursive (UnityEngine.UIElements.VisualElement element, System.Int32 depth) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.StyleSheets.HierarchyTraversal.Traverse (UnityEngine.UIElements.VisualElement element) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdater.ApplyStyles () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdater.Update () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <2500dd078a544a69b6c923861af6cd15>:0)
//this error shows up multiple times

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UIElements.StyleSheets.StyleSelectorHelper.FastLookup (System.Collections.Generic.IDictionary`2[TKey,TValue] table, System.Collections.Generic.List`1[T] matchedSelectors, UnityEngine.UIElements.StyleMatchingContext context, System.String input, UnityEngine.UIElements.StyleSheets.SelectorMatchRecord& record) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.StyleSheets.StyleSelectorHelper.FindMatches (UnityEngine.UIElements.StyleMatchingContext context, System.Collections.Generic.List`1[T] matchedSelectors) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdaterTraversal.TraverseRecursive (UnityEngine.UIElements.VisualElement element, System.Int32 depth) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.StyleSheets.HierarchyTraversal.Traverse (UnityEngine.UIElements.VisualElement element) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdater.ApplyStyles () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdater.Update () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <2500dd078a544a69b6c923861af6cd15>:0)
//this error also appears multiple times

EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)


//then more of the two long errors

no idea where to even begin with this

I am also having this problem whenever I’m opening the project, sometimes I have to replace the default layout in the project library to even get to access the project (otherwise it forces me to quit). I am not using any custom windows or layouts.

If anyone finds a solution please post it here.

ReleaseAllScriptCaches did not release all script caches!

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.UIElements.UIElementsEntryPoint.CreateRoot () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.UIElementsEntryPoint.GetRootVisualElement (UnityEditor.EditorWindow window) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnRegisterWindow () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnCreate (UnityEditor.IWindowModel model) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.GUIView.set_windowBackend (UnityEditor.IWindowBackend value) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.GUIView.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.HostView.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.UIElements.UIElementsEntryPoint.CreateRoot () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.UIElementsEntryPoint.GetRootVisualElement (UnityEditor.EditorWindow window) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnRegisterWindow () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnCreate (UnityEditor.IWindowModel model) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.GUIView.set_windowBackend (UnityEditor.IWindowBackend value) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.GUIView.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.HostView.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.DockArea.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadDefaultWindowPreferences()

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.UIElements.UIElementsEntryPoint.CreateRoot () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.UIElementsEntryPoint.GetRootVisualElement (UnityEditor.EditorWindow window) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnRegisterWindow () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnCreate (UnityEditor.IWindowModel model) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.GUIView.set_windowBackend (UnityEditor.IWindowBackend value) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.GUIView.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.HostView.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.DockArea.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadDefaultWindowPreferences()

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.UIElements.UIElementsEntryPoint.CreateRoot () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.UIElementsEntryPoint.GetRootVisualElement (UnityEditor.EditorWindow window) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnRegisterWindow () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnCreate (UnityEditor.IWindowModel model) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.GUIView.set_windowBackend (UnityEditor.IWindowBackend value) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.GUIView.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.HostView.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.DockArea.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadDefaultWindowPreferences()

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.EditorToolbar.CreateRoot () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.EditorToolbar.get_rootVisualElement () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.Toolbar.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadDefaultWindowPreferences()

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.UIElements.UIElementsEntryPoint.CreateRoot () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.UIElementsEntryPoint.GetRootVisualElement (UnityEditor.EditorWindow window) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnRegisterWindow () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.OnCreate (UnityEditor.IWindowModel model) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.GUIView.set_windowBackend (UnityEditor.IWindowBackend value) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.GUIView.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.HostView.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.DockArea.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadDefaultWindowPreferences()

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.UIElements.UIElementsEntryPoint.CreateRoot () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.UIElements.UIElementsEntryPoint.GetRootVisualElement (UnityEditor.EditorWindow window) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.EditorWindow.get_rootVisualElement () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.PropertyEditor.LoadVisualTreeFromUxml () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.InspectorWindow.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadDefaultWindowPreferences()

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.SceneView.CreateCameraRectVisualElement () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditor.SceneView.OnEnable () (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadDefaultWindowPreferences()

And when I get this I can’t choose any of the first two, it forces me to quit and I have to recopy the CurrentLayout-default dwlt in the project library folder to get it to work again.

2 Likes

FloaterTS, that end .dwlt issue is a whole other known problem, unfortunately.

Hopefully both of them get solved soon, I ran into both within days of upgrading to Unity 2020.

If this helps.
I also encounter this problem last night, and I just did Assets/Reimport All and the error just gone.

15 Likes

@EpicAsMe your solution worked for me, thanks.

2020 is a horrible release, stay away until it’s in a better state…

Glad it helps you :slight_smile:

I’ve got this problem too:

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.UIElementsEditorUtility..cctor () (at <9ddd600ae5964fe0b21a870e08c53748>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.UIElements.UIElementsEditorUtility' threw an exception.
UnityEditor.UIElements.UIElementsEntryPoint.CreateRoot () (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEditor.UIElements.UIElementsEntryPoint.GetRootVisualElement (UnityEditor.EditorWindow window) (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEditor.EditorWindow.get_rootVisualElement () (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEditor.PropertyEditor.RebuildContentsContainers () (at <9ddd600ae5964fe0b21a870e08c53748>:0)
UnityEditor.InspectorWindow.RedrawFromNative () (at <9ddd600ae5964fe0b21a870e08c53748>:0)

P.S. null check your stuff lmao.

Also starting to see this randomly. Whole editor layout starts getting unstable.

Our team has the same issue. Most of the time a restart solves it, but could randomly happen again.

Reimport All does NOT fix this in my case.

Hey all! I am late to the party but figured I would offer up what worked for me to see if it helps you. All I did was go into my game files "(Game Folder) → Library and delete the folder titled “UIElements.” By doing this, unity automatically remade the elements folder fresh, and my UI in-game was not harmed and worked perfectly. Let me know if this quick fix works for you as well as me. Have a great day!

1 Like

I thought this worked at first, but then the error returned later. As previously reported, the errors appear every other time the project is loaded. So effectively, I need to load a project twice before I can work.
DC

Yep, I have to reload twice to get it to work, but it is honestly worth it. Would hate to restart a whole game for a dumb bug like this. Unity should look into fixing this, as it is very nerve-racking. The fix I gave you was just temporary. Make sure to check your files for the “UIElements” folder, as I have had it return multiple times, and had to delete it before build + running it. Have a great day!

2 Likes

…the issue seemed to be fixed after I reset the UI window layout to factory settings. I previously had a number of windows in tabs, such as project settings, profiler, shadergraph etc, so perhaps one or more of those window settings are incompatible with the 2020 version.
DC