Пример #1
0
        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;
                }
            }
        }
Пример #2
0
        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;
                }
            }
        }