Ejemplo n.º 1
0
        /// <summary>
        /// Triggered when the user clicks on the create buttons. Opens a browse dialog that allows the user to select
        /// a folder to a new project to create. Project data will be initialized in the chosen folder and new project
        /// will be opened.
        /// </summary>
        void CreateClicked()
        {
            string projectPath = projectInputBox.Value;

            if (!Directory.Exists(projectPath))
            {
                projectPath = Directory.GetCurrentDirectory();
            }

            string selectedPath;

            if (BrowseDialog.OpenFolder(projectPath, out selectedPath))
            {
                projectInputBox.Value = selectedPath;

                EditorApplication.CreateProject(selectedPath);
                OpenProject();
            }
        }