Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

Unity 2017.3 Editor Crash when use EditorUtility.OpenFolderPanel

$
0
0
When I use EditorUtiliy.OpenFolderPanel method for getting directory path on operating system(macOSX in Unity 2017.3, the editor is crashed always. When I use the same method in Unity 2017.2 or older versions of Unity, the editor is not crashed. How can I solve this problem? Please help me. Thanks for your time. 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(); }

Viewing all articles
Browse latest Browse all 2383

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>