C# 场景是黑色的

C# 场景是黑色的,c#,unity3d,C#,Unity3d,我在Unity中创建了一个新项目,我总是在Unity控制台中看到这个错误,我的场景就是黑色的 我的版本是2019.4.0f1个人版 NullReferenceException: Object reference not set to an instance of an object UnityEditor.HostView.DeregisterSelectedPane (System.Boolean clearActualView, System.Boolean sendEvents) (a

我在Unity中创建了一个新项目,我总是在Unity控制台中看到这个错误,我的场景就是黑色的

我的版本是
2019.4.0f1个人版

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()
NullReferenceException:对象引用未设置为对象的实例
UnityEdit.HostView.DeregisterSelectedPane(System.Boolean clearActualView,System.Boolean sendEvents)(位于:0)
UnityEditor.HostView.SetActualViewernal(UnityEditor.EditorWindow值,System.Boolean sendEvents)(位于:0)
UnityEdit.HostView.set_实际视图(UnityEdit.EditorWindow值)(位于:0)
UnityEditor.DockArea.OnEnable()(位于:0)
UnityEditorInternal.InternalEditorUtility:LoadSerializedLeandForGet(字符串)
WindowLayout:LoadDefaultWindowPreferences()

我没有做任何事情,只是创建了这个项目

似乎无法加载窗口首选项(LoadDefaultWindowPreferences)。这些是编辑器设置,也是您在全新项目中看到错误的原因

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

基本上,一些
变量
null
,代码尝试访问
变量。一些
。看,我没有任何代码。你安装了任何资产吗?不,我不这么认为,我只是启动了unity hub并创建了一个新的3d项目