提问者:小点点

Unity编辑器场景为黑色


我在Unity中创建了一个新项目,但我总是在Unity控制台中遇到此错误,并且我的场景只是黑色

图像

我的版本是2019.4.0F1 Personal

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.HostView.DeregisterSelectedPane (System.Boolean clearActualView, System.Boolean sendEvents) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditor.HostView.SetActualViewInternal (UnityEditor.EditorWindow value, System.Boolean sendEvents) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditor.HostView.set_actualView (UnityEditor.EditorWindow value) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditor.DockArea.OnEnable () (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
UnityEditor.WindowLayout:LoadDefaultWindowPreferences()

我什么都没做我只是创建了这个项目


共1个答案

匿名用户

似乎无法加载窗口首选项(LoadDefaultWindowPreferences)。 这些是编辑器的设置,也是为什么即使在一个全新的项目上也会看到错误的原因。

重置布局通常可以解决这个问题:窗口->布局->恢复出厂设置。