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(); }
static void ShowContact() { GameFrameworkHelper.ShowContact(); }
static void ShowSupportForum() { GameFrameworkHelper.ShowSupportForum(); }
static void ShowDocumentation() { GameFrameworkHelper.ShowDocumentation(); }
static void ShowHomepage() { GameFrameworkHelper.ShowHomepage(); }
public void ShowPaidVersion() { GameManager.Instance.PlayEffect(ClickAudioClip); GameFrameworkHelper.ShowAssetStorePageExtrasBundle(); }
public void ShowAssetStorePage() { GameManager.Instance.PlayEffect(ClickAudioClip); GameFrameworkHelper.ShowAssetStorePage(); }
public void OnlineTutorials() { GameManager.Instance.PlayEffect(ClickAudioClip); GameFrameworkHelper.ShowOnlineTutorials(); }