void OnGUI() { scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition, false, false, GUI.skin.horizontalScrollbar, GUI.skin.verticalScrollbar, GUI.skin.box); if (GUILayout.Button("Save")) { serialise(); } EditorGUILayout.Space(); EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.LabelField("Configuration settings:"); EditorGUILayout.Space(); EditorGUI.BeginChangeCheck(); androidBillingPlatform = EditorGUILayout.Popup("Android billing platform:", androidBillingPlatform, androidBillingPlatforms, new GUILayoutOption[0]); config.AndroidBillingPlatform = (BillingPlatform)Enum.Parse(typeof(BillingPlatform), androidBillingPlatforms[androidBillingPlatform]); config.AmazonSandboxEnabled = EditorGUILayout.Toggle("Use Amazon sandbox:", config.AmazonSandboxEnabled); config.WP8SandboxEnabled = EditorGUILayout.Toggle("Use mock Windows Phone environment:", config.WP8SandboxEnabled); config.UseWin8_1Sandbox = EditorGUILayout.Toggle("Use mock Windows 8", config.UseWin8_1Sandbox); config.SamsungAppsMode = (SamsungAppsMode)EditorGUILayout.EnumPopup("Samsung Apps mode:", config.SamsungAppsMode); config.SamsungItemGroupId = EditorGUILayout.TextField("Samsung Apps Item Group ID:", config.SamsungItemGroupId); if (EditorGUI.EndChangeCheck()) { serialise(); } EditorGUILayout.BeginHorizontal(); config.UseHostedConfig = EditorGUILayout.Toggle("Use hosted config", config.UseHostedConfig); config.HostedConfigUrl = EditorGUILayout.TextField(config.HostedConfigUrl); EditorGUILayout.EndHorizontal(); config.GooglePlayPublicKey = EditorGUILayout.TextField("Google play public key:", config.GooglePlayPublicKey); config.iOSSKU = EditorGUILayout.TextField("iOS SKU:", config.iOSSKU); config.macAppStoreSKU = EditorGUILayout.TextField("Mac App Store SKU:", config.macAppStoreSKU); EditorGUILayout.EndVertical(); GUIStyle wrap = new GUIStyle(); wrap.wordWrap = true; EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.LabelField("Downloadable Content"); EditorGUILayout.Space(); GUILayout.Label("Serve paid downloadable content to your users using Unicontent, our fully hosted, secure & reliable subscription service that's built into Unibill.", wrap); EditorGUILayout.Space(); if (GUILayout.Button("Find out more", GUILayout.Width(100))) { Application.OpenURL("http://www.outlinegames.com/unicontent"); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.LabelField("Unibill Analytics"); EditorGUILayout.Space(); GUILayout.Label("Free analytics of your App's performance. View daily sales, installs & engagement across all platforms, all from one place!", wrap); EditorGUILayout.Space(); if (GUILayout.Button("Sign up for free!", GUILayout.Width(100))) { Application.OpenURL("http://www.unibiller.com"); } EditorGUILayout.Space(); config.UnibillAnalyticsAppId = EditorGUILayout.TextField("Unibill Analytics App Id:", config.UnibillAnalyticsAppId); config.UnibillAnalyticsAppSecret = EditorGUILayout.TextField("Unibill Analytics App Secret:", config.UnibillAnalyticsAppSecret); EditorGUILayout.EndVertical(); EditorGUILayout.Space(); EditorGUILayout.LabelField("Purchasable items:"); EditorGUILayout.Space(); foreach (GUIPurchasable item in items) { EditorGUILayout.BeginVertical(GUI.skin.box); item.OnGUI(); EditorGUILayout.EndVertical(); } if (GUILayout.Button("Add item...")) { items.Add(GUIPurchasable.CreateInstance(config.AddItem())); } currencyEditor.onGUI(); EditorGUILayout.EndScrollView(); items.RemoveAll(x => toRemove.Contains(x)); foreach (var item in toRemove) { config.inventory.Remove(item.item.item); } toRemove.Clear(); }
void OnGUI() { scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition, false, false, GUI.skin.horizontalScrollbar, GUI.skin.verticalScrollbar, GUI.skin.box); if (GUILayout.Button("Save")) { serialise(); } EditorGUILayout.Space(); EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.LabelField("Configuration settings:"); EditorGUILayout.Space(); EditorGUI.BeginChangeCheck(); androidBillingPlatform = EditorGUILayout.Popup("Android billing platform:", androidBillingPlatform, androidBillingPlatforms, new GUILayoutOption[0]); config.AndroidBillingPlatform = (BillingPlatform)Enum.Parse(typeof(BillingPlatform), androidBillingPlatforms[androidBillingPlatform]); config.AmazonSandboxEnabled = EditorGUILayout.Toggle("Use Amazon sandbox:", config.AmazonSandboxEnabled); config.WP8SandboxEnabled = EditorGUILayout.Toggle("Use mock Windows Phone environment:", config.WP8SandboxEnabled); config.UseWin8_1Sandbox = EditorGUILayout.Toggle("Use mock Windows 8", config.UseWin8_1Sandbox); config.SamsungAppsMode = (SamsungAppsMode)EditorGUILayout.EnumPopup("Samsung Apps mode:", config.SamsungAppsMode); config.SamsungItemGroupId = EditorGUILayout.TextField("Samsung Apps Item Group ID:", config.SamsungItemGroupId); if (EditorGUI.EndChangeCheck()) { serialise(); } EditorGUILayout.BeginHorizontal(); config.UseHostedConfig = EditorGUILayout.Toggle("Use hosted config", config.UseHostedConfig); config.HostedConfigUrl = EditorGUILayout.TextField(config.HostedConfigUrl); EditorGUILayout.EndHorizontal(); config.GooglePlayPublicKey = EditorGUILayout.TextField("Google play public key:", config.GooglePlayPublicKey); config.iOSSKU = EditorGUILayout.TextField("iOS SKU:", config.iOSSKU); config.macAppStoreSKU = EditorGUILayout.TextField("Mac App Store SKU:", config.macAppStoreSKU); EditorGUILayout.EndVertical(); GUIStyle wrap = new GUIStyle(); wrap.wordWrap = true; wrap.normal.textColor = new Color(1, 1, 1, 0.5f); EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.LabelField("Unity Analytics"); EditorGUILayout.Space(); EditorGUILayout.LabelField("Don't be in the dark about your game.", wrap); EditorGUILayout.Space(); EditorGUILayout.LabelField("Unibill comes with full integration with Unity Analytics. Sign-up and go through their basic integration process; no additional instrumentation is required.", wrap); EditorGUILayout.Space(); if (GUILayout.Button("Access Unity Analytics", GUILayout.Width(150))) { Application.OpenURL("http://www.unity3d.com/unity/analytics"); } EditorGUILayout.EndVertical(); EditorGUILayout.Space(); EditorGUILayout.LabelField("Purchasable items:"); EditorGUILayout.Space(); foreach (GUIPurchasable item in items) { EditorGUILayout.BeginVertical(GUI.skin.box); item.OnGUI(); EditorGUILayout.EndVertical(); } if (GUILayout.Button("Add item...")) { items.Add(GUIPurchasable.CreateInstance(config.AddItem())); } currencyEditor.onGUI(); EditorGUILayout.EndScrollView(); items.RemoveAll(x => toRemove.Contains(x)); foreach (var item in toRemove) { config.inventory.Remove(item.item.item); } toRemove.Clear(); }
void OnGUI() { scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition, false, false, GUI.skin.horizontalScrollbar, GUI.skin.verticalScrollbar, GUI.skin.box); if (GUILayout.Button("Save")) { serialise(); } EditorGUILayout.Space(); EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.LabelField("Configuration settings:"); EditorGUILayout.Space(); EditorGUI.BeginChangeCheck(); androidBillingPlatform = EditorGUILayout.Popup("Android billing platform:", androidBillingPlatform, androidBillingPlatforms, new GUILayoutOption[0]); config.AndroidBillingPlatform = (BillingPlatform)Enum.Parse(typeof(BillingPlatform), androidBillingPlatforms[androidBillingPlatform]); config.AmazonSandboxEnabled = EditorGUILayout.Toggle("Use Amazon sandbox:", config.AmazonSandboxEnabled); config.WP8SandboxEnabled = EditorGUILayout.Toggle("Use mock Windows Phone environment:", config.WP8SandboxEnabled); config.UseWin8_1Sandbox = EditorGUILayout.Toggle("Use mock Windows 8", config.UseWin8_1Sandbox); config.SamsungAppsMode = (SamsungAppsMode)EditorGUILayout.EnumPopup("Samsung Apps mode:", config.SamsungAppsMode); config.SamsungItemGroupId = EditorGUILayout.TextField("Samsung Apps Item Group ID:", config.SamsungItemGroupId); if (EditorGUI.EndChangeCheck()) { serialise(); } EditorGUILayout.BeginHorizontal(); config.UseHostedConfig = EditorGUILayout.Toggle("Use hosted config", config.UseHostedConfig); config.HostedConfigUrl = EditorGUILayout.TextField(config.HostedConfigUrl); EditorGUILayout.EndHorizontal(); config.GooglePlayPublicKey = EditorGUILayout.TextField("Google play public key:", config.GooglePlayPublicKey); config.iOSSKU = EditorGUILayout.TextField("iOS SKU:", config.iOSSKU); EditorGUILayout.EndVertical(); EditorGUILayout.Space(); EditorGUILayout.LabelField("Purchasable items:"); EditorGUILayout.Space(); foreach (GUIPurchasable item in items) { EditorGUILayout.BeginVertical(GUI.skin.box); item.OnGUI(); EditorGUILayout.EndVertical(); } if (GUILayout.Button("Add item...")) { items.Add(GUIPurchasable.CreateInstance(config.AddItem())); } currencyEditor.onGUI(); EditorGUILayout.EndScrollView(); items.RemoveAll(x => toRemove.Contains(x)); foreach (var item in toRemove) { config.inventory.Remove(item.item.item); } toRemove.Clear(); }