Example #1
0
        void OnGUI()
        {
            if (windowSO == null)
            {
                windowSO = new SerializedObject(this);
            }

            GUITools.Space(topSpaces);

            scrollPos = GUILayout.BeginScrollView(scrollPos);
            EditorGUILayout.LabelField("Scenes to build:", GUITools.boldLabel);

            UpdateToReflectSettings();
            windowSO.ApplyModifiedProperties();

            EditorGUI.BeginChangeCheck();

            windowSO.Update();

            EditorGUILayout.PropertyField(windowSO.FindProperty("scenes"), true);


            GUILayout.EndScrollView();
            if (EditorGUI.EndChangeCheck())
            {
                UpdateSettings();
            }

            windowSO.ApplyModifiedProperties();
        }
Example #2
0
        void OnGUI()
        {
            GUILayout.Space(4);
            GUIStyle label = new GUIStyle(EditorStyles.toolbarButton);// EditorStyles.label);

            label.richText         = true;
            label.normal.textColor = Color.white;
            label.alignment        = TextAnchor.MiddleLeft;

            GUIStyle labelStyle = new GUIStyle(EditorStyles.label);

            labelStyle.richText  = true;
            labelStyle.alignment = TextAnchor.MiddleLeft;

            GUI.backgroundColor = GUITools.gray;
            GUILayout.BeginVertical(EditorStyles.helpBox);
            GUI.backgroundColor = Color.white;

            GUILayout.BeginHorizontal();
            if (GUILayout.Button("Re-Analyze"))
            {
                Analyze(false);
            }
            if (GUILayout.Button("Re-Analyze (Include Meta Files)"))
            {
                Analyze(true);
            }
            GUILayout.EndHorizontal();

            GUILayout.Label("<b>Total:</b>\t" + ConvertSize(total), labelStyle);
            GUILayout.EndVertical();

            labelStyle.fontSize = 10;

            scrollPos = EditorGUILayout.BeginScrollView(scrollPos);

            GUI.backgroundColor = GUITools.gray;
            if (GUILayout.Button("<b>ALL FILES</b>\t\t[" + files.Count + "]", label))
            {
                showFiles = !showFiles;
            }
            GUI.backgroundColor = GUITools.white;

            if (showFiles)
            {
                DrawFilesList(files, labelStyle);
            }

            GUITools.Space(2);

            for (int i = 0; i < categories.Count; i++)
            {
                Bar(categories[i], label, labelStyle);
            }

            EditorGUILayout.EndScrollView();
        }
        void OnGUI()
        {
            if (windowSO == null)
            {
                windowSO = new SerializedObject(this);
            }

            GUITools.Space(2);
            if (GUILayout.Button("Start Build"))
            {
                ProjectBuilder.PerformBuild(BuildFinalScenes(), company, productName, buildTargets, versionUpdate, forceVersion, forcedVersion, devBuild, connectProfiler, allowDebugging, headless, bundleID);
            }


            windowSO.Update();

            EditorGUILayout.PropertyField(windowSO.FindProperty("company"), true);
            EditorGUILayout.PropertyField(windowSO.FindProperty("productName"), true);
            EditorGUILayout.PropertyField(windowSO.FindProperty("buildTargets"), true);

            EditorGUILayout.PropertyField(windowSO.FindProperty("forceVersion"), true);
            if (windowSO.FindProperty("forceVersion").boolValue)
            {
                EditorGUILayout.PropertyField(windowSO.FindProperty("forcedVersion"), true);
            }
            else
            {
                EditorGUILayout.PropertyField(windowSO.FindProperty("versionUpdate"), true);
            }

            EditorGUILayout.PropertyField(windowSO.FindProperty("devBuild"), true);

            if (windowSO.FindProperty("devBuild").boolValue)
            {
                EditorGUILayout.PropertyField(windowSO.FindProperty("allowDebugging"), true);
                EditorGUILayout.PropertyField(windowSO.FindProperty("connectProfiler"), true);
            }
            else
            {
                EditorGUILayout.PropertyField(windowSO.FindProperty("headless"), true);
            }

            EditorGUILayout.PropertyField(windowSO.FindProperty("bundleID"), true);

            EditorGUILayout.LabelField("Scenes to build:", GUITools.boldLabel);

            scrollPos = GUILayout.BeginScrollView(scrollPos);
            EditorGUILayout.PropertyField(windowSO.FindProperty("scenes"), true);
            GUILayout.EndScrollView();

            windowSO.ApplyModifiedProperties();
        }
Example #4
0
        // public static bool LoadMasterOnPlay
        // {
        //     get { return EditorPrefs.GetBool(cEditorPrefLoadMasterOnPlay, false); }
        //     set { EditorPrefs.SetBool(cEditorPrefLoadMasterOnPlay, value); }
        // }
        // const string cEditorPrefLoadMasterOnPlay = "SceneAutoLoader.LoadMasterOnPlay";

        void OnGUI()
        {
            if (windowSO == null)
            {
                windowSO = new SerializedObject(this);
            }

            GUITools.Space(topSpaces);

            bool playInitialSceneFirst = InitialSceneWorkflow.LoadInitialOnPlay;

            GUI.backgroundColor = playInitialSceneFirst ? GUITools.blue : GUITools.white;
            if (GUILayout.Button("Play Initial Scene First In Editor"))
            {
                InitialSceneWorkflow.LoadInitialOnPlay = !playInitialSceneFirst;
            }
            GUI.backgroundColor = GUITools.white;

            if (GUILayout.Button("Open Master Scene In Editor"))
            {
                EditorSceneManager.OpenScene(EditorBuildSettings.scenes[0].path);
            }

            string skipToScene = InitialSceneWorkflow.SkipToScene;

            string skipToScene2 = EditorGUILayout.TextField("Skip To Scene On Play", skipToScene);

            if (skipToScene2 != skipToScene)
            {
                InitialSceneWorkflow.SkipToScene = skipToScene2;
            }

            GUITools.Space();

            EditorGUILayout.LabelField("Scenes to build:", GUITools.boldLabel);

            UpdateToReflectSettings();
            windowSO.ApplyModifiedProperties();

            EditorGUI.BeginChangeCheck();

            windowSO.Update();

            EditorGUILayout.PropertyField(windowSO.FindProperty("scenes"), true);

            if (EditorGUI.EndChangeCheck())
            {
                UpdateSettings();
            }

            windowSO.ApplyModifiedProperties();
        }