【问题标题】:Unity 2017.3 Editor Crash when use EditorUtility.OpenFolderPanelUnity 2017.3 使用 EditorUtility.OpenFolderPanel 时编辑器崩溃
【发布时间】:2017-12-25 08:23:47
【问题描述】:

当我使用 EditorUtiliy.OpenFolderPanel 方法获取操作系统上的目录路径时(Unity 2017.3 中的 macOSX,编辑器总是崩溃。当我在 Unity 2017.2 或更早版本的 Unity 中使用相同方法时,编辑器不会崩溃。

我该如何解决这个问题?请帮帮我。

感谢您的宝贵时间。

 private void SetRootDirectory()
{
    string path = Application.dataPath + "/Resources/root.txt";
    string rootPath = EditorUtility.OpenFolderPanel("Select Location", Application.dataPath, ""); //editor is crashing because of this line

    using (FileStream fs = new FileStream(path, FileMode.Create))
    {
        using (StreamWriter writer = new StreamWriter(fs))
        {
            writer.Write(rootPath);
        }

    }

    AssetDatabase.Refresh();
}

【问题讨论】:

  • 可能应该在 Unity 论坛中询问,因为这是特定于编辑器的
  • 感谢@SurajS 的建议,我也只是在 UnityForums 中提问。 answers.unity.com/questions/1446417/…
  • 2017.3有很多bug。很多。所以建议你回滚或等待任何补丁。

标签: unity3d unity-editor


【解决方案1】:

Detailed Answer

感谢 Unity 团队的解决方案。他们在 Unity 2018.1 中解决了这个问题。

电子邮件详细信息:

嘿,

非常感谢您报告问题。

这个错误似乎已经在 2018.1 中修复。它是 不确定何时会在 2017.3 中修复此问题,所以我建议 降级到最新的 2017.2 补丁版本。

您可以从这里下载 Unity 的最新补丁版本: https://unity3d.com/unity/qa/patch-releases

如果您还有其他问题,请随时提出。

问候,Linas 质量检查团队

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-23
    • 1970-01-01
    • 1970-01-01
    • 2019-04-21
    • 2010-09-24
    • 1970-01-01
    相关资源
    最近更新 更多