예제 #1
0
        public static void DisplayWizard(Action <string> onCreate)
        {
            // Display wizard
            NewConfigWizard wizard = ScriptableWizard.DisplayWizard <NewConfigWizard>("New Config wizard", "Create");

            // Setup
            wizard.ConfigName = "";
            wizard.OnCreate   = onCreate;
        }
예제 #2
0
        private void DrawConfigManage()
        {
            // Set path text front
            var boldtext = new GUIStyle(GUI.skin.label)
            {
                fontStyle = FontStyle.Bold,
                fontSize  = 15
            };

            EditorGUILayout.LabelField(string.Format("Current config path : {0}", _curConfigPath), boldtext,
                                       GUILayout.Height(25));

            // Create new config button
            GUIHelper.DrawButton("New Config", () =>
            {
                NewConfigWizard.DisplayWizard((configName) =>
                {
                    var newConfigPath = string.Format("{0}{1}.asset", QuickBuild.ConfigFolder, configName);
                    QuickBuild.CreateConfig(newConfigPath);
                    LoadConfig(newConfigPath);
                });
            }, Color.blue);

            // Save current config as new
            GUIHelper.DrawButton("Save as New..", () =>
            {
                NewConfigWizard.DisplayWizard((configName) =>
                {
                    string newConfigPath = string.Format("{0}{1}.asset", QuickBuild.ConfigFolder, configName);
                    QuickBuild.CreateConfig(newConfigPath, _curConfig);
                    LoadConfig(newConfigPath);
                });
            }, Color.blue);

            DrawConfigList();
        }