For some reason, Device Simulator randomly stopped working. Whenever I click on the simulator window, all I see is a blank screen, not even a view of the main camera. This has happened across several of the branches on my project, I get hit with these errors:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.DeviceSimulation.DeviceLoader.LoadDevices () (at <7ec6425c0b2642379ed29e2e01668751>:0)
UnityEditor.DeviceSimulation.DeviceSimulatorMain…ctor (UnityEditor.DeviceSimulation.SimulatorState serializedState, UnityEngine.UIElements.VisualElement rootVisualElement, UnityEditor.PlayModeView view) (at <7ec6425c0b2642379ed29e2e01668751>:0)
UnityEditor.DeviceSimulation.SimulatorWindow.OnEnable () (at <7ec6425c0b2642379ed29e2e01668751>:0)
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadDefaultWindowPreferences()
and
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.DeviceSimulation.SimulatorWindow.OnGUI () (at <7ec6425c0b2642379ed29e2e01668751>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at :0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at :0)
UnityEditor.DockArea.OldOnGUI () (at :0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at <47b027fd293a40dc82409a6b0f8c8525>:0)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render () (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <47b027fd293a40dc82409a6b0f8c8525>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at :0)
I tried to reinstall/restart device simulator, in hopes of fixing this problem, and instead i get this:
ArgumentException: An item with the same key has already been added. Key: UnityEditor.AdaptivePerformance.Editor.AdaptivePerformanceUIExtension
System.Collections.Generic.Dictionary2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <0de99929796b4095b47389e59e446fbd>:0) System.Collections.Generic.Dictionary
2[TKey,TValue].Add (TKey key, TValue value) (at <0de99929796b4095b47389e59e446fbd>:0)
UnityEditor.DeviceSimulation.SimulatorState.OnAfterDeserialize () (at <7ec6425c0b2642379ed29e2e01668751>:0)
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadDefaultWindowPreferences()
Any ideas on how to fix this?