void DrawSequenceList()
 {
     settings.sequences = sequencesList.Show();
     if (sequencesList?.Selected != null)
     {
         sequencesList.Selected.editorName   = EditorGUILayout.TextField("Sequence name", sequencesList.Selected.editorName);
         sequencesList.Selected.itchGameLink = EditorGUILayout.TextField("Itch.io link", sequencesList.Selected.itchGameLink);
     }
 }
    void DrawSelectedSequenceData()
    {
        EditorGUILayout.Space(20);
        sequencesList.Selected.builds = buidsList.Show();
        if (buidsList?.Selected != null)
        {
            SerializedObject obj = new SerializedObject(settings);

            buidsList.Selected.isPassbyBuild          = EditorGUILayout.Toggle("Is Passby build", buidsList.Selected.isPassbyBuild);
            buidsList.Selected.outputRoot             = EditorGUILayout.TextField("Output root", buidsList.Selected.outputRoot);
            buidsList.Selected.middlePath             = EditorGUILayout.TextField("Middle path", buidsList.Selected.middlePath);
            buidsList.Selected.scriptingDefinySymbols = EditorGUILayout.TextField("Scripting Defines", buidsList.Selected.scriptingDefinySymbols);

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("Build Target Group", GUILayout.MinWidth(0));
            buidsList.Selected.targetGroup = (BuildTargetGroup)EditorGUILayout.EnumPopup(buidsList.Selected.targetGroup);
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("Build Target", GUILayout.MinWidth(0));
            buidsList.Selected.target = (BuildTarget)EditorGUILayout.EnumPopup(buidsList.Selected.target);
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("Build Options", GUILayout.MinWidth(0));
            buidsList.Selected.options = (BuildOptions)EditorGUILayout.EnumFlagsField(buidsList.Selected.options);
            EditorGUILayout.EndHorizontal();
            EditorGUILayout.Space(20);

            buidsList.Selected.isVirtualRealitySupported = EditorGUILayout.Toggle("VR Supported", buidsList.Selected.isVirtualRealitySupported);

            zipFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(zipFoldout, "7zip");
            if (zipFoldout)
            {
                ++EditorGUI.indentLevel;
                buidsList.Selected.needZip         = EditorGUILayout.Toggle("Compress", buidsList.Selected.needZip);
                buidsList.Selected.compressDirPath = EditorGUILayout.TextField("Dir path", buidsList.Selected.compressDirPath);
                --EditorGUI.indentLevel;
            }
            EditorGUILayout.EndFoldoutHeaderGroup();

            itchFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(itchFoldout, "itch.io");
            if (itchFoldout)
            {
                ++EditorGUI.indentLevel;
                buidsList.Selected.needItchPush = EditorGUILayout.Toggle("Push to itch.io", buidsList.Selected.needItchPush);
                buidsList.Selected.itchDirPath  = EditorGUILayout.TextField("Dir path", buidsList.Selected.itchDirPath);
                buidsList.Selected.itchChannel  = EditorGUILayout.TextField("Channel", buidsList.Selected.itchChannel);
                buidsList.Selected.itchAddLastChangelogUpdateNameToVerison = EditorGUILayout.Toggle("Add Changelog Update Name To Verison", buidsList.Selected.itchAddLastChangelogUpdateNameToVerison);
                --EditorGUI.indentLevel;
            }
            EditorGUILayout.EndFoldoutHeaderGroup();
        }

        EditorUtility.SetDirty(settings);
    }
Exemple #3
0
    void OnGUI()
    {
        if (settings == null)
        {
            LoadSettings();
        }

        PlayerSettings.bundleVersion             = EditorGUILayout.TextField("Version", PlayerSettings.bundleVersion);
        PlayerSettings.Android.bundleVersionCode = EditorGUILayout.IntField("Android bundle version", PlayerSettings.Android.bundleVersionCode);
        EditorGUILayout.Space(20);

        if ((settings?.sequences?.Length ?? 0) != 0)
        {
            EditorGUILayout.LabelField("Start build sequence");
            foreach (var sequence in settings.sequences)
            {
                if (GUILayout.Button($"Build {sequence.editorName}"))
                {
                    BuildManager.RunBuildSequnce(sequence);
                }
            }
        }

        EditorGUILayout.Space(20);
        scrollPosAll = EditorGUILayout.BeginScrollView(scrollPosAll);

        settings.sequences = sequencesList.Show();
        if (sequencesList?.Selected != null)
        {
            sequencesList.Selected.editorName   = EditorGUILayout.TextField("Sequence name", sequencesList.Selected.editorName);
            sequencesList.Selected.itchGameLink = EditorGUILayout.TextField("Itch.io link", sequencesList.Selected.itchGameLink);
        }

        EditorGUILayout.Space(20);
        sequencesList.Selected.builds = buidsList.Show();
        if (buidsList?.Selected != null)
        {
            SerializedObject obj = new SerializedObject(settings);

            buidsList.Selected.outputRoot = EditorGUILayout.TextField("Output root", buidsList.Selected.outputRoot);
            buidsList.Selected.middlePath = EditorGUILayout.TextField("Middle path", buidsList.Selected.middlePath);

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("Build Target Group", GUILayout.MinWidth(0));
            buidsList.Selected.targetGroup = (BuildTargetGroup)EditorGUILayout.EnumPopup(buidsList.Selected.targetGroup);
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("Build Target", GUILayout.MinWidth(0));
            buidsList.Selected.target = (BuildTarget)EditorGUILayout.EnumPopup(buidsList.Selected.target);
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("Build Options", GUILayout.MinWidth(0));
            buidsList.Selected.options = (BuildOptions)EditorGUILayout.EnumFlagsField(buidsList.Selected.options);
            EditorGUILayout.EndHorizontal();
            EditorGUILayout.Space(20);

            zipFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(zipFoldout, "7zip");
            if (zipFoldout)
            {
                ++EditorGUI.indentLevel;
                buidsList.Selected.needZip         = EditorGUILayout.Toggle("Compress", buidsList.Selected.needZip);
                buidsList.Selected.compressDirPath = EditorGUILayout.TextField("Dir path", buidsList.Selected.compressDirPath);
                --EditorGUI.indentLevel;
            }
            EditorGUILayout.EndFoldoutHeaderGroup();

            itchFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(itchFoldout, "itch.io");
            if (itchFoldout)
            {
                ++EditorGUI.indentLevel;
                buidsList.Selected.needItchPush = EditorGUILayout.Toggle("Push to itch.io", buidsList.Selected.needItchPush);
                buidsList.Selected.itchDirPath  = EditorGUILayout.TextField("Dir path", buidsList.Selected.itchDirPath);
                buidsList.Selected.itchChannel  = EditorGUILayout.TextField("Channel", buidsList.Selected.itchChannel);
                --EditorGUI.indentLevel;
            }
            EditorGUILayout.EndFoldoutHeaderGroup();
        }

        EditorUtility.SetDirty(settings);
        EditorGUILayout.EndScrollView();
    }