Beispiel #1
0
        protected virtual void DrawBuild(ProjectBuilder builder)
        {
            using (new EditorGUILayout.HorizontalScope())
            {
                EditorGUI.BeginDisabledGroup(!builder.BuildApplication);

                // Build.
                if (GUILayout.Button(
                        new GUIContent("Build",
                                       EditorGUIUtility.FindTexture("preAudioPlayOff")), "LargeButton"))
                {
                    EditorApplication.delayCall += () => ProjectBuilderUtil.StartBuild(builder, false, false);
                }

                // Open output.
                var r = EditorGUILayout.GetControlRect(false, GUILayout.Width(15));

                if (GUI.Button(new Rect(r.x - 2, r.y + 5, 20, 20), contentOpen, EditorStyles.label))
                {
                    string outputFullPath = BuildPathUtils.GetOutputPath(builder);
                    ProjectBuilderUtil.RevealOutputInFinder(outputFullPath);
                }

                EditorGUI.EndDisabledGroup();
            }
        }
Beispiel #2
0
        protected virtual void DrawBuildAssetBundles(ProjectBuilder builder)
        {
            using (new EditorGUILayout.HorizontalScope())
            {
                EditorGUI.BeginDisabledGroup(!builder.BuildAssetBundle);
                // Build.
                if (GUILayout.Button(
                        new GUIContent("Build AssetBundles",
                                       EditorGUIUtility.FindTexture("buildsettings.editor.small")), "LargeButton"))
                {
                    EditorApplication.delayCall += () => ProjectBuilderUtil.StartBuild(builder, false, true);
                }

                // Open output.
                var rect = EditorGUILayout.GetControlRect(false, GUILayout.Width(15));

                if (GUI.Button(new Rect(rect.x - 2, rect.y + 5, 20, 20), contentOpen, EditorStyles.label))
                {
                    Directory.CreateDirectory(builder.BundleOutputPath);
                    ProjectBuilderUtil.RevealOutputInFinder(builder.BundleOutputPath);
                }

                EditorGUI.EndDisabledGroup();
            }
        }