void FileCreateProject() { string path = ""; string curPath = System.IO.Directory.GetCurrentDirectory(); var rt = nfdnative.NFD_PickFolder(curPath, ref path); if (rt == nfdnative.nfdresult.NFD_OKAY) { ProjectNative.SetProjectPath(path); var ret = Project.Create(path); if (ret == Project.ProjectCreateResult.NotEmpty) { Debug.LogError("directory is not empty"); return; } } }
void FileOpenProject() { string path = ""; string curPath = System.IO.Directory.GetCurrentDirectory(); var rt = nfdnative.NFD_PickFolder(curPath, ref path); if (rt == nfdnative.nfdresult.NFD_OKAY) { ProjectNative.SetProjectPath(path); try { Project.Open(path); } catch (Exception e) { Debug.LogErrorFormat("打开项目失败 {0}", e.ToString()); return; } } }