Example #1
0
        void OnGUI()
        {
            if (_stylesNotLoaded)
            {
                LoadStyles();
            }

            EditorGUILayout.Space();
            GUILayout.Label(new GUIContent("<size=20><b><color=#666666>Foundation Framework</color></b></size>"), _publisherNameStyle);
            EditorGUILayout.Space();

           #if !DOTWEEN
            EditorGUILayout.Space();
            if (ButtonPressed("[1]: Import Dotween package"))
            {
                UnityEditorInternal.AssetStore.Open(DotweenAddress);
            }
            EditorGUILayout.LabelField(" click here to access package.", _greyText);

            EditorGUILayout.Space();
            if (ButtonPressed("[2]: Setup DoTween"))
            {
                Debug.Log(" Open Tools/Demigiant/Dotween Utility panel.");
            }
            EditorGUILayout.LabelField(" Open Tools/Demigiant/Dotween Utility panel.", _greyText);

            EditorGUILayout.Space();
            if (ButtonPressed("[3]: Enable Dotween Integration"))
            {
                string Directive = "DOTWEEN";
                PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android, Directive);
                PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Facebook, Directive);
                PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.iOS, Directive);
                PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, Directive);
                PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.tvOS, Directive);
                PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.WebGL, Directive);
                PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Facebook, Directive);
                PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.PS4, Directive);
                PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.XboxOne, Directive);
                Debug.Log("Adding the scripting define symbol " + Directive);
                SupportWindow currentWindow = GetWindow <SupportWindow>(WindowName);
                currentWindow.Close();
            }
            EditorGUILayout.LabelField(" to enable the logic.", _greyText);
             #else
            _toolBarIndex = GUILayout.Toolbar(_toolBarIndex, _toolbarOptions, _toolBarStyle, _toolbarHeight);

            switch (_toolBarIndex)
            {
            case 0:
                EditorGUILayout.Space();
                if (EditorUtility.ButtonPressed("Open save folder", "open_save"))
                {
                    SaveEditor.OpenDataFolder();
                }
                EditorGUILayout.LabelField(" Play First to create the folder.", _greyText);

                EditorGUILayout.Space();
                if (EditorUtility.ButtonPressed("Delete all saves", "folder_delete"))
                {
                    SaveEditor.ClearSaveFolder();
                }
                EditorGUILayout.LabelField(" Data folder + all profiles.", _greyText);

                EditorGUILayout.Space();
                if (EditorUtility.ButtonPressed("Go to Scenes", "unity"))
                {
                    EditorMenu.PingInProject("Assets/Foundation Framework/Scenes");
                }
                EditorGUILayout.LabelField(" Select the scenes folder.", _greyText);
                break;

            case 1:
                EditorGUILayout.Space();
                if (EditorUtility.ButtonPressed("Send an email", "mail"))
                {
                    EditorMenu.AskQuestionByEmail();
                }
                EditorGUILayout.LabelField(" Ask any question here.", _greyText);

                EditorGUILayout.Space();
                if (EditorUtility.ButtonPressed("Documentation", "docs"))
                {
                    EditorMenu.OpenFoundationDocumentation();
                }
                EditorGUILayout.LabelField(" All modules explained.", _greyText);

                EditorGUILayout.Space();
                if (EditorUtility.ButtonPressed("Developer Website", "tiny_tree"))
                {
                    EditorMenu.OpenDeveloperWebsite();
                }
                EditorGUILayout.LabelField(" Games & assets made.", _greyText);
                break;
            }
            #endif



            GUILayout.FlexibleSpace();
            EditorGUILayout.LabelField(new GUIContent(Version), _centeredVersionLabel);
            EditorGUILayout.Space();
            if (GUILayout.Button(new GUIContent("<size=11> Please consider leaving us a review.</size>", EditorUtility.GetEditorTexture("star"), ""), _reviewBanner, _bannerHeight))
            {
                UnityEditorInternal.AssetStore.Open(StoreAdress);
            }
        }