void OnGUI()
        {
            GUI.enabled = !EditorApplication.isCompiling && !ModExporter.isExporting && !Application.isPlaying;

            exportSettingsEditor.OnInspectorGUI();

            GUILayout.FlexibleSpace();

            if (ExportSettings.WorkshopId != 0)
            {
                GUILayout.Space(5);
                GUILayout.Label("This item is on the Workshop!  To add screenshots and videos, visit the Workshop page and click the 'Add/Edit images & videos' button.", EditorStyles.helpBox);
                GUILayout.Space(5);
                if (GUILayout.Button("Visit Workshop", GUILayout.Height(30)) &&
                    EditorUtility.DisplayDialog("Open Browser", "This will open your browser to visit the Workshop page.  Are you sure?", "Yes", "Cancel"))
                {
                    Application.OpenURL(ExportSettings.WorkshopUrl);
                }
            }

            if (GUILayout.Button("Export Mod", GUILayout.Height(30)) &&
                EditorUtility.DisplayDialog("Export Mod", "This will start the mod export process.  Are you sure?", "Yes", "Cancel"))
            {
                ModExporter.ExportMod();
            }
        }
Beispiel #2
0
        void OnGUI()
        {
            GUI.enabled = !EditorApplication.isCompiling && !ModExporter.isExporting && !Application.isPlaying;

            exportSettingsEditor.OnInspectorGUI();

            GUILayout.FlexibleSpace();

            bool buttonPressed = GUILayout.Button("Export Mod", GUILayout.Height(30));

            if (buttonPressed)
            {
                ModExporter.ExportMod();
            }
        }