c# - Unity Editor 场景为黑色
问题描述
我在 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()
我什么都没做,我只是创建了这个项目
解决方案
似乎它无法加载窗口首选项(LoadDefaultWindowPreferences)。这些是编辑器设置,也是您在全新项目中看到错误的原因。
重置布局通常可以解决这个问题:Window->Layouts->Revert Factory Settings。
推荐阅读
- php - 你知道为什么会出现“BadMethodCallException Method [validateEquired] 不存在”吗?
- laravel - Laravel - 使用谷歌recaptcha时无法输入错误
- javascript - jQuery FadeIn / FadeOut 方法不起作用
- php - 正则表达式:将文本拆分为单词、空格和逗号:除了单引号缩写
- android - 允许用户更改 JSOUP URL
- visual-studio-code - VS Code 是否应该覆盖导航标题中的现有选项卡?
- regex - 如何使用 sed 将 u'sometext' 替换为 'sometext'
- mongodb - 得到信号:11(分段错误)Mongo DB v4.0.0
- python-3.x - Python中的RSA OAEP解密
- python - Selenium - 不同名称的屏幕截图