Example #1
0
        void OnGUI()
        {
            GUI.DrawTexture(new Rect(0, 0, 400, 100), _startWindowIcon);

            var buttonsRect = new Rect(10, 110, WindowWidth - 20, 20);

            if (GUI.Button(buttonsRect, "Homepage"))
            {
                GameFrameworkHelper.ShowHomepage();
            }

            buttonsRect.y += 30;
            if (GUI.Button(buttonsRect, "Documentation"))
            {
                GameFrameworkHelper.ShowDocumentation();
            }

            buttonsRect.y += 30;
            if (GUI.Button(buttonsRect, "Getting Started Tutorials"))
            {
                GameFrameworkHelper.ShowOnlineTutorials();
            }

            buttonsRect.y += 30;
            if (GUI.Button(buttonsRect, "Support Forum"))
            {
                GameFrameworkHelper.ShowSupportForum();
            }

            buttonsRect.y += 30;
            if (GUI.Button(buttonsRect, "Integrations"))
            {
                IntegrationsWindow.ShowWindow();
            }

            buttonsRect.y += 30;
            if (GUI.Button(buttonsRect, "Contact"))
            {
                GameFrameworkHelper.ShowContact();
            }

            buttonsRect.y += 30;
            if (GUI.Button(buttonsRect, "Like it? Rate Us"))
            {
                GameFrameworkHelper.ShowAssetStorePage();
            }

            var newAutoShow = GUI.Toggle(new Rect(10, WindowHeight - 20, WindowWidth - 20, 20), _autoShow, "Show on startup");

            if (newAutoShow != _autoShow)
            {
                _autoShow = newAutoShow;
                EditorPrefs.SetBool(AutoShowPrefsKey, _autoShow);
            }
        }
        void ShowAsset(string assetName, string defineName, string url, string description, string urlName, string folder = null, Texture2D icon = null, bool isInBundle = false)
        {
            EditorGUILayout.BeginVertical("Box");

            GUILayout.BeginHorizontal();
            GUI.enabled = folder == null || AssetDatabase.IsValidFolder(folder);
            if (defineName != null)
            {
                if (GUILayout.Toggle(PlayerSettingsHelper.IsScriptingDefineSet(defineName), ""))
                {
                    PlayerSettingsHelper.AddScriptingDefineAllTargets(defineName);
                }
                else
                {
                    PlayerSettingsHelper.RemoveScriptingDefineAllTargets(defineName);
                }
            }
            GUI.enabled = true;
            GUILayout.Label(assetName, new GUIStyle(EditorStyles.boldLabel)
            {
                padding = new RectOffset(5, 5, 5, 5), margin = new RectOffset(0, 0, 0, 0)
            });
            GUILayout.FlexibleSpace();
            if (EditorHelper.LinkButton(urlName, true))
            {
                Application.OpenURL(url);
            }
            if (isInBundle)
            {
                GUILayout.Label(" | ");
                if (EditorHelper.LinkButton("Extras Bundle", true))
                {
                    GameFrameworkHelper.ShowAssetStorePageExtrasBundle();
                }
            }
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            if (icon != null)
            {
                GUILayout.Label(icon, GUILayout.Width(64), GUILayout.Height(64));
            }
            EditorGUILayout.HelpBox(description, MessageType.None);
            GUILayout.EndHorizontal();

            EditorGUILayout.EndVertical();
        }
Example #3
0
 static void ShowContact()
 {
     GameFrameworkHelper.ShowContact();
 }
Example #4
0
 static void ShowSupportForum()
 {
     GameFrameworkHelper.ShowSupportForum();
 }
Example #5
0
 static void ShowDocumentation()
 {
     GameFrameworkHelper.ShowDocumentation();
 }
Example #6
0
 static void ShowHomepage()
 {
     GameFrameworkHelper.ShowHomepage();
 }
Example #7
0
 public void ShowPaidVersion()
 {
     GameManager.Instance.PlayEffect(ClickAudioClip);
     GameFrameworkHelper.ShowAssetStorePageExtrasBundle();
 }
Example #8
0
 public void ShowAssetStorePage()
 {
     GameManager.Instance.PlayEffect(ClickAudioClip);
     GameFrameworkHelper.ShowAssetStorePage();
 }
Example #9
0
 public void OnlineTutorials()
 {
     GameManager.Instance.PlayEffect(ClickAudioClip);
     GameFrameworkHelper.ShowOnlineTutorials();
 }