Unity 2017.3 编辑器在使用时崩溃 EditorUtility.OpenFolderPanel
Unity 2017.3 Editor Crash when use EditorUtility.OpenFolderPanel
当我在Unity 2017.3操作系统(macOSX)上使用EditorUtiliy.OpenFolderPanel方法获取目录路径时,编辑器总是崩溃。当我在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 团队的解决方案。他们在 Unity 2018.1 中解决了这个问题。
电子邮件详细信息:
Hey,
Thanks a lot for reporting an issue.
It appears that this bug has already been fixed in 2018.1. It is
uncertain when this issue will be fixed for 2017.3, so I would suggest
downgrading to the latest 2017.2 patch release.
You can download latest patch releases of Unity from here:
https://unity3d.com/unity/qa/patch-releases
If you have any further questions, feel free to ask.
Regards, Linas QA team
当我在Unity 2017.3操作系统(macOSX)上使用EditorUtiliy.OpenFolderPanel方法获取目录路径时,编辑器总是崩溃。当我在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 团队的解决方案。他们在 Unity 2018.1 中解决了这个问题。
电子邮件详细信息:
Hey,
Thanks a lot for reporting an issue.
It appears that this bug has already been fixed in 2018.1. It is uncertain when this issue will be fixed for 2017.3, so I would suggest downgrading to the latest 2017.2 patch release.
You can download latest patch releases of Unity from here: https://unity3d.com/unity/qa/patch-releases
If you have any further questions, feel free to ask.
Regards, Linas QA team