private void ForceTouchItemsBlock() { using (new SA_WindowBlockWithSpace(new GUIContent("Force Touch Items"))) { SA_EditorGUILayout.ReorderablList(ISN_Settings.Instance.ShortcutItems, (ISN_UIApplicationShortcutItem item) => { return(item.Title); }, (ISN_UIApplicationShortcutItem item) => { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Title"); item.Title = EditorGUILayout.TextField(item.Title); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Subtitle"); item.Subtitle = EditorGUILayout.TextField(item.Subtitle); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Type"); item.Type = EditorGUILayout.TextField(item.Type); EditorGUILayout.EndHorizontal(); }, () => { ISN_UIApplicationShortcutItem newItem = new ISN_UIApplicationShortcutItem(string.Empty); newItem.Title = "New Item"; ISN_Settings.Instance.ShortcutItems.Add(newItem); }); } }
public override void OnInspectorGUI() { if (TestSuiteConfigSerialized == null) { return; } EditorGUI.BeginChangeCheck(); EditorGUILayout.Space(); SA_EditorGUILayout.ReorderablList(Config.TestGroups, GroupTitle, GroupContent, OnNewGroup, null, OnGorupStartUI); EditorGUILayout.Space(); Config.PauseOnError = SA_EditorGUILayout.ToggleFiled("Error Pause", Config.PauseOnError, SA_StyledToggle.ToggleType.YesNo); Config.SkipInteractableTests = SA_EditorGUILayout.ToggleFiled("Skip Interactable", Config.SkipInteractableTests, SA_StyledToggle.ToggleType.YesNo); if (EditorGUI.EndChangeCheck()) { TestSuiteConfigSerialized.ApplyModifiedProperties(); TestSuiteConfigSerialized = new SerializedObject(target); } EditorGUILayout.Space(); }
public static void Library() { SA_EditorGUILayout.Header("LIBRARIES"); EditorGUILayout.BeginHorizontal(); EditorGUI.indentLevel++; ISD_Settings.Instance.IsDefLibrariesOpen = EditorGUILayout.Foldout(ISD_Settings.Instance.IsDefLibrariesOpen, "Default Unity Libraries (2 Enabled)"); EditorGUI.indentLevel--; EditorGUILayout.EndHorizontal(); if (ISD_Settings.Instance.IsDefLibrariesOpen) { EditorGUILayout.BeginVertical(GUI.skin.box); SA_EditorGUILayout.SelectableLabel("libiPhone-lib.a", ""); SA_EditorGUILayout.SelectableLabel("libiconv.2.dylib", ""); EditorGUILayout.EndVertical(); EditorGUILayout.Space(); } EditorGUILayout.Space(); SA_EditorGUILayout.HorizontalLine(); EditorGUILayout.LabelField("Custom Libraries", EditorStyles.boldLabel); SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.Libraries, (ISD_Library lib) => { if (lib.IsOptional) { return(lib.Name + " (Optional)"); } else { return(lib.Name); } }, (ISD_Library lib) => { lib.IsOptional = SA_EditorGUILayout.ToggleFiled("Optional", lib.IsOptional, SA_StyledToggle.ToggleType.YesNo); } ); EditorGUILayout.BeginHorizontal(); EditorStyles.popup.fixedHeight = 20; NewLibraryIndex = EditorGUILayout.Popup(NewLibraryIndex, ISD_LibHandler.BaseLibrariesArray()); if (GUILayout.Button("Add Library", GUILayout.Height(20))) { ISD_iOSLibrary type = (ISD_iOSLibrary)ISD_LibHandler.enumValueOf(ISD_LibHandler.BaseLibrariesArray()[NewLibraryIndex]); NewLibraryIndex = 0; ISD_API.AddLibrary(type); } EditorGUILayout.EndHorizontal(); SA_EditorGUILayout.HorizontalLine(); }
private void DrawICloudSettings() { using (new SA_WindowBlockWithSpace(new GUIContent("iCloud Key-Value Storage"))) { var description = new GUIContent("Key-value storage is similar to Unity PlayerPrefs; " + "but values that you place in key-value storage are available to every " + "instance of your app on all of a user’s various devices."); using (new SA_GuiBeginHorizontal()) { GUILayout.Space(15); EditorGUILayout.LabelField(description, SA_PluginSettingsWindowStyles.DescribtionLabelStyle); } EditorGUILayout.Space(); bool KeyValueStorageEnabled = ISD_API.Capability.iCloud.Enabled && ISD_API.Capability.iCloud.keyValueStorage; EditorGUI.BeginChangeCheck(); KeyValueStorageEnabled = SA_EditorGUILayout.ToggleFiled("API Status", KeyValueStorageEnabled, SA_StyledToggle.ToggleType.EnabledDisabled); if (EditorGUI.EndChangeCheck()) { if (KeyValueStorageEnabled) { ISD_API.Capability.iCloud.Enabled = true; ISD_API.Capability.iCloud.keyValueStorage = true; } else { ISD_API.Capability.iCloud.Enabled = false; ISD_API.Capability.iCloud.keyValueStorage = false; } } } }
public static void Flags() { SA_EditorGUILayout.Header("LINKER FLAGS"); SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.Flags, (ISD_Flag flag) => { if (flag.Type.Equals(ISD_FlagType.CompilerFlag)) { return(flag.Name + " (Compiler)"); } else { return(flag.Name + " (Linker)"); } }, (ISD_Flag flag) => { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Full Name:", GUILayout.Width(100)); flag.Name = EditorGUILayout.TextField(flag.Name, GUILayout.ExpandWidth(true)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Type:", GUILayout.Width(100)); //flag.Type = EditorGUILayout.TextField(flag.Type, GUILayout.ExpandWidth(true)); flag.Type = (ISD_FlagType)EditorGUILayout.EnumPopup(flag.Type); EditorGUILayout.EndHorizontal(); }, () => { ISD_Flag newFlag = new ISD_Flag(); newFlag.Name = "New Flag"; ISD_Settings.Instance.Flags.Add(newFlag); } ); }
protected override void OnServiceUI() { using (new SA_WindowBlockWithSpace(new GUIContent("Your license key"))) { EditorGUILayout.HelpBox("RSA public key will be used for app licensing. & in-app billing purchases", MessageType.Info); EditorGUILayout.LabelField("Base64-encoded RSA public key"); AN_Settings.Instance.RSAPublicKey = EditorGUILayout.TextArea(AN_Settings.Instance.RSAPublicKey, SA_PluginSettingsWindowStyles.TextArea, GUILayout.Height(95)); AN_Settings.Instance.RSAPublicKey.Trim(); } using (new SA_WindowBlockWithSpace(new GUIContent("Licensing "))) { EditorGUILayout.HelpBox("Licensing allows you to prevent unauthorized distribution of your App.", MessageType.Info); AN_Settings.Instance.Licensing = SA_EditorGUILayout.ToggleFiled("API Status", AN_Settings.Instance.Licensing, SA_StyledToggle.ToggleType.EnabledDisabled); } using (new SA_WindowBlockWithSpace(new GUIContent("In-App Products List"))) { if (AN_Settings.Instance.InAppProducts.Count == 0) { EditorGUILayout.HelpBox("Use this menu to specify in-app products available for your App.", MessageType.Info); } SA_EditorGUILayout.ReorderablList(AN_Settings.Instance.InAppProducts, GetProductDisplayName, DrawProductContent, () => { var product = new AN_Product("your.product.sku", AN_ProductType.inapp); product.Title = "New Product"; AN_Settings.Instance.InAppProducts.Add(product); }); } }
private void EditorAPIEmulation() { using (new SA_WindowBlockWithSpace(new GUIContent("Editor API Emulation"))) { using (new SA_H2WindowBlockWithSpace(new GUIContent("PLAYER"))) { var player = UM_Settings.Instance.GSEditorPlayer; player.Id = SA_EditorGUILayout.TextField(s_PlayerId, player.Id); player.Alias = SA_EditorGUILayout.TextField(s_PlayerAlias, player.Alias); player.DisplayName = SA_EditorGUILayout.TextField(s_PlayerDisplayName, player.DisplayName); using (new SA_GuiBeginHorizontal()) { EditorGUILayout.LabelField(s_PlayerAvatar); player.Avatar = (Texture2D)EditorGUILayout.ObjectField(player.Avatar, typeof(Texture2D), false, GUILayout.Height(EditorGUIUtility.singleLineHeight)); } } using (new SA_H2WindowBlockWithSpace(new GUIContent("ACHIEVEMENTS"))) { EditorGUILayout.HelpBox("Achievements Editor list is bound with iOS Achivement's list.", MessageType.Info); ISN_GameKitUI.DrawAchievementsList(); } using (new SA_H2WindowBlockWithSpace(new GUIContent("LEADERBOARDS"))) { EditorGUILayout.HelpBox("This data will only be used for an editor API emulation.", MessageType.Info); DrawLeaderboardsList(); } } }
private void CopyFilestoXCodeBuildPhasee() { Texture2D folder = SA_EditorAssets.GetTextureAtPath(ISD_Skin.ICONS_PATH + "folder.png"); using (new SA_WindowBlockWithIndent(new GUIContent("Copy Files to XCode Build Phasee", folder))) { SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.Files, (ISD_AssetFile file) => { return(file.XCodeRelativePath); }, (ISD_AssetFile file) => { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Asset: "); file.Asset = EditorGUILayout.ObjectField(file.Asset, typeof(UnityEngine.Object), false); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("XCode Path:"); file.XCodePath = EditorGUILayout.TextField(file.XCodePath); EditorGUILayout.EndHorizontal(); }, () => { ISD_Settings.Instance.Files.Add(new ISD_AssetFile()); } ); EditorGUILayout.Space(); } }
private void Settings() { Texture2D settings_icon = SA_EditorAssets.GetTextureAtPath(ISD_Skin.ICONS_PATH + "isdSettings.png"); using (new SA_WindowBlockWithIndent(new GUIContent("Settings", settings_icon))) { bool isEnabled = ISD_Settings.PostProcessEnabled; EditorGUI.BeginChangeCheck(); isEnabled = SA_EditorGUILayout.ToggleFiled("Build PostProcess", isEnabled, SA_StyledToggle.ToggleType.YesNo); if (EditorGUI.EndChangeCheck()) { EditorUtility.DisplayDialog("Configuration", "Changes will be applide after scripts re-recompilation is completed", "Okay"); if (isEnabled) { SA_EditorDefines.RemoveCompileDefine("ISD_DISABLED", BuildTargetGroup.iOS); } else { SA_EditorDefines.AddCompileDefine("ISD_DISABLED", BuildTargetGroup.iOS); } } if (!ISD_Settings.PostProcessEnabled) { EditorGUILayout.HelpBox("Build PostProcess is curreently disabled. " + "The XCode project will not be modifayed.", MessageType.Error); } } }
private void ShellScriptsBuildPhasee() { Texture2D plistVariables_icon = SA_EditorAssets.GetTextureAtPath(ISD_Skin.ICONS_PATH + "plistVariables.png"); using (new SA_WindowBlockWithIndent(new GUIContent("Shell Scripts Build Phasee", plistVariables_icon))) { SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.ShellScripts, (ISD_ShellScript script) => { return(script.Name); }, (ISD_ShellScript script) => { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Name: "); script.Name = EditorGUILayout.TextField(script.Name); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Shell: "); script.Shell = EditorGUILayout.TextField(script.Shell); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Script"); script.Script = EditorGUILayout.TextField(script.Script); EditorGUILayout.EndHorizontal(); }, () => { ISD_Settings.Instance.ShellScripts.Add(new ISD_ShellScript()); } ); EditorGUILayout.Space(); } }
public override void OnGUI() { #if (UNITY_IOS || UNITY_TVOS) Settings(); #else EditorGUILayout.HelpBox("XCode Build Post-Process isn't avaliable on current platfrom", MessageType.Error); #endif Texture2D buildSettings_icon = SA_EditorAssets.GetTextureAtPath(ISD_Skin.ICONS_PATH + "BuildSettings.png"); using (new SA_WindowBlockWithIndent(new GUIContent("Build Properties", buildSettings_icon))) { foreach (var property in ISD_Settings.Instance.BuildProperties) { property.Value = SA_EditorGUILayout.StringValuePopup(property.Name, property.Value, property.Options); } EditorGUILayout.Space(); } Frameworks(); DrawEmbeddedBlock(); BuildFlags(); Languages(); CopyFilestoXCodeBuildPhasee(); ShellScriptsBuildPhasee(); Entitlements(); }
public static void DrawAchievementsList() { SA_EditorGUILayout.ReorderablList(ISN_Settings.Instance.Achievements, GetAchievementDisplayName, DrawAchievementContent, () => { ISN_Settings.Instance.Achievements.Add(new ISN_GKAchievement("my.new.achievement.id")); }); }
private void Settings() { using (new SA_WindowBlockWithSpace(new GUIContent("Settings"))) { using (new SA_H2WindowBlockWithSpace(new GUIContent("ANDROID"))) { AN_Settings.Instance.GooglePlayGamesAPI = SA_EditorGUILayout.ToggleFiled(AN_GooglePlayFeaturesUI.GamesLabelContent, AN_Settings.Instance.GooglePlayGamesAPI, SA_StyledToggle.ToggleType.EnabledDisabled); UM_Settings.Instance.AndroidRequestEmail = SA_EditorGUILayout.ToggleFiled(s_AndoirdRequestEmailContent, UM_Settings.Instance.AndroidRequestEmail, SA_StyledToggle.ToggleType.EnabledDisabled); UM_Settings.Instance.AndroidRequestProfile = SA_EditorGUILayout.ToggleFiled(s_AndoirdRequestProfileContent, UM_Settings.Instance.AndroidRequestProfile, SA_StyledToggle.ToggleType.EnabledDisabled); UM_Settings.Instance.AndroidSavedGamesEnabled = SA_EditorGUILayout.ToggleFiled(s_AndoirdSavedGamesContent, UM_Settings.Instance.AndroidSavedGamesEnabled, SA_StyledToggle.ToggleType.EnabledDisabled); UM_Settings.Instance.AndroidRequestServerAuthCode = SA_EditorGUILayout.ToggleFiled(s_AndoirdRequestServerAuthCodeContent, UM_Settings.Instance.AndroidRequestServerAuthCode, SA_StyledToggle.ToggleType.EnabledDisabled); if (UM_Settings.Instance.AndroidRequestServerAuthCode) { UM_Settings.Instance.AndroidGMSServerId = SA_EditorGUILayout.TextField("Server Id", UM_Settings.Instance.AndroidGMSServerId); } } using (new SA_H2WindowBlockWithSpace(new GUIContent("iOS"))) { ISN_Settings.Instance.SavingAGame = SA_EditorGUILayout.ToggleFiled(s_IOSSavingAGameContent, ISN_Settings.Instance.SavingAGame, SA_StyledToggle.ToggleType.EnabledDisabled); } using (new SA_H2WindowBlockWithSpace(new GUIContent("EDITOR"))) { EditorGUILayout.HelpBox("Platform does not require any additional settings.", MessageType.Info); } } }
public void Languages() { EditorGUI.BeginChangeCheck(); Texture2D languages_icon = SA_EditorAssets.GetTextureAtPath(ISD_Skin.ICONS_PATH + "languages.png"); using (new SA_WindowBlockWithIndent(new GUIContent("Languages", languages_icon))) { SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.Languages, (SA_ISOLanguage lang) => { return(lang.Code.ToUpper() + " (" + lang.Name + ")"); } ); EditorGUILayout.BeginHorizontal(); s_newLangindex = EditorGUILayout.Popup(s_newLangindex, SA_LanguagesUtil.ISOLanguagesList.Names.ToArray()); if (GUILayout.Button("Add Language", EditorStyles.miniButton, GUILayout.Width(100))) { var lang = SA_LanguagesUtil.ISOLanguagesList.Languages[s_newLangindex]; ISD_Settings.Instance.Languages.Add(lang); } EditorGUILayout.EndHorizontal(); } if (EditorGUI.EndChangeCheck()) { if (ISD_Settings.Instance.Languages.Count == 0) { ISD_API.RemoveInfoPlistKey(ISD_Settings.CF_LOCLIZATIONS_PLIST_KEY); } } }
public static void ShellScripts() { SA_EditorGUILayout.Header("Shell Scripts Build Phase"); SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.ShellScripts, (ISD_ShellScript script) => { return(script.Name); }, (ISD_ShellScript script) => { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Name: "); script.Name = EditorGUILayout.TextField(script.Name); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Shell: "); script.Shell = EditorGUILayout.TextField(script.Shell); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Script"); script.Script = EditorGUILayout.TextField(script.Script); EditorGUILayout.EndHorizontal(); }, () => { ISD_Settings.Instance.ShellScripts.Add(new ISD_ShellScript()); } ); }
public static void BuildSettings() { SA_EditorGUILayout.Header("Build Settings"); foreach (var property in ISD_Settings.Instance.BuildProperties) { property.Value = SA_EditorGUILayout.StringValuePopup(property.Name, property.Value, property.Options); } }
public static void DrawRequirementsUI(ISN_XcodeRequirements xcodeRequirements) { if (xcodeRequirements.Frameworks.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("FRAMEWORKS"))) { foreach (var freamwork in xcodeRequirements.Frameworks) { SA_EditorGUILayout.SelectableLabel(new GUIContent(freamwork.Type.ToString() + ".framework", ISD_Skin.GetIcon("frameworks.png"))); } } } if (xcodeRequirements.Libraries.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("LIBRARIES"))) { foreach (var freamwork in xcodeRequirements.Libraries) { SA_EditorGUILayout.SelectableLabel(new GUIContent(freamwork.Type.ToString() + ".framework", ISD_Skin.GetIcon("frameworks.png"))); } } } if (xcodeRequirements.Capabilities.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("CAPABILITIES"))) { foreach (var capability in xcodeRequirements.Capabilities) { SA_EditorGUILayout.SelectableLabel(new GUIContent(capability + " Capability", ISD_Skin.GetIcon("capability.png"))); } } } if (xcodeRequirements.PlistKeys.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("PLIST KEYS"))) { foreach (var key in xcodeRequirements.PlistKeys) { SA_EditorGUILayout.SelectableLabel(new GUIContent(key.Name, ISD_Skin.GetIcon("plistVariables.png"))); } } } if (xcodeRequirements.Properties.Count > 0) { using (new SA_H2WindowBlockWithSpace(new GUIContent("BUILD PROPERTIES"))) { foreach (var property in xcodeRequirements.Properties) { SA_EditorGUILayout.SelectableLabel(new GUIContent(property.Name + " | " + property.Value, ISD_Skin.GetIcon("buildSettings.png"))); } } } }
public static void AboutGUI() { GUI.enabled = true; EditorGUILayout.HelpBox("About the Plugin", MessageType.None); EditorGUILayout.Space(); SA_EditorGUILayout.SelectableLabel(SdkVersion, ISD_Settings.VERSION_NUMBER); SA_CompanyGUILayout.SupportMail(); SA_CompanyGUILayout.DrawLogo(); }
public override void OnGUI() { EditorGUI.BeginChangeCheck(); EditorGUILayout.Space(); EditorGUILayout.HelpBox(DESCRIBTION, MessageType.Info); using (new SA_WindowBlockWithIndent(new GUIContent("Settings"))) { m_state.DisplayCollapse = SA_EditorGUILayout.ToggleFiled("Collapse Button", m_state.DisplayCollapse, SA_StyledToggle.ToggleType.EnabledDisabled); m_state.DisplayClearOnPlay = SA_EditorGUILayout.ToggleFiled("Clear On Play Button", m_state.DisplayClearOnPlay, SA_StyledToggle.ToggleType.EnabledDisabled); m_state.DisplayPauseOnError = SA_EditorGUILayout.ToggleFiled("Error Pause Button", m_state.DisplayPauseOnError, SA_StyledToggle.ToggleType.EnabledDisabled); m_state.DisplaySearchBar = SA_EditorGUILayout.ToggleFiled("Search Bar", m_state.DisplaySearchBar, SA_StyledToggle.ToggleType.EnabledDisabled); m_state.RichText = SA_EditorGUILayout.ToggleFiled("Rich Text", m_state.RichText, SA_StyledToggle.ToggleType.EnabledDisabled); } using (new SA_WindowBlockWithIndent(new GUIContent("Tags"))) { EditorGUILayout.BeginVertical(GUILayout.ExpandWidth(true)); { ReorderableListGUI.ListField(UCL_Settings.Instance.Tags, (Rect position, UCL_ConsoleTag tag) => { position.x -= 15; int dockedToggleWidth = 40; Rect labelRect = new Rect(position); labelRect.width = position.width - dockedToggleWidth; EditorGUI.LabelField(labelRect, tag.DisaplyContent); Rect docedRect = new Rect(position); docedRect.x = labelRect.x + labelRect.width; docedRect.width = dockedToggleWidth; bool docked = m_state.IsTagDocked(tag); docked = EditorGUI.Toggle(docedRect, docked); m_state.SetTagDockedState(tag, docked); return(tag); }, () => { }, ReorderableListFlags.HideAddButton | ReorderableListFlags.HideRemoveButtons ); } EditorGUILayout.EndVertical(); } if (EditorGUI.EndChangeCheck()) { UCL_Settings.SaveConsoleWindowState(m_state); } }
protected override void OnServiceUI() { using (new SA_WindowBlockWithSpace(new GUIContent("Music Player Controller"))) { ISN_Settings.Instance.MediaLibraryUsageDescriptionEnabled = SA_EditorGUILayout.ToggleFiled("API State", ISN_Settings.Instance.MediaLibraryUsageDescriptionEnabled, SA_StyledToggle.ToggleType.EnabledDisabled); using (new SA_GuiEnable(ISN_Settings.Instance.MediaLibraryUsageDescriptionEnabled)) { EditorGUILayout.LabelField(MediaLibraryUsageDescription); using (new SA_GuiIndentLevel(1)) { ISN_Settings.Instance.MediaLibraryUsageDescription = EditorGUILayout.TextArea(ISN_Settings.Instance.MediaLibraryUsageDescription, SA_PluginSettingsWindowStyles.TextArea, GUILayout.Height(30)); } } } }
public static void OnGUI() { var unityClient = UM_Settings.Instance.Analytics.UnityClient; EditorGUILayout.HelpBox("Controls whether to limit user tracking at runtime.", MessageType.Info); unityClient.LimitUserTracking = SA_EditorGUILayout.ToggleFiled(s_limitUserTrackingLabel, unityClient.LimitUserTracking, SA_StyledToggle.ToggleType.YesNo); EditorGUILayout.Space(); EditorGUILayout.HelpBox("Controls whether the sending of device stats at runtime is enabled.", MessageType.Info); unityClient.DeviceStatsEnabled = SA_EditorGUILayout.ToggleFiled(s_deviceStatsEnabledLabel, unityClient.DeviceStatsEnabled, SA_StyledToggle.ToggleType.YesNo); }
protected override void OnServiceUI() { using (new SA_WindowBlockWithSpace(new GUIContent("In-App Products List"))) { if (ISN_Settings.Instance.InAppProducts.Count == 0) { EditorGUILayout.HelpBox("Use this menu to specify in-app products available for your App.", MessageType.Info); } SA_EditorGUILayout.ReorderablList(ISN_Settings.Instance.InAppProducts, GetProductDisplayName, DrawProductContent, () => { ISN_Settings.Instance.InAppProducts.Add(new ISN_SKProduct()); }); } }
public static void OnGUI() { if (AN_FirebaseDefinesResolver.IsAnalyticsSDKInstalled) { var firebaseClient = UM_Settings.Instance.Analytics.FirebaseClient; EditorGUILayout.HelpBox("Controls whether the sending of device stats at runtime is enabled. (seconds)", MessageType.Info); firebaseClient.SessionTimeoutDuration = SA_EditorGUILayout.IntField(s_SessionTimeoutDuration, firebaseClient.SessionTimeoutDuration); } else { AN_FirebaseFeaturesUI.DrawAnalyticsInstalRequired(); } }
private void DrawProductContent(ISN_SKProduct product) { product.ProductIdentifier = SA_EditorGUILayout.TextField(m_ProductIdDLabel, product.ProductIdentifier); product.LocalizedTitle = SA_EditorGUILayout.TextField(m_DisplayNameLabel, product.LocalizedTitle); product.Type = (ISN_SKProductType)SA_EditorGUILayout.EnumPopup(m_ProductTypeLabel, product.Type); product.PriceTier = (ISN_SKPriceTier)SA_EditorGUILayout.EnumPopup(m_PriceTierLabel, product.PriceTier); EditorGUILayout.LabelField(m_DescriptionLabel); using (new SA_GuiBeginHorizontal()) { product.LocalizedDescription = EditorGUILayout.TextArea(product.LocalizedDescription, GUILayout.Height(60), GUILayout.MinWidth(190)); EditorGUILayout.Space(); product.Icon = (Texture2D)EditorGUILayout.ObjectField("", product.Icon, typeof(Texture2D), false, GUILayout.Width(75)); } }
public override void OnGUI() { EditorGUILayout.Space(); EditorGUILayout.HelpBox(DESCRIBTION, MessageType.Info); using (new SA_WindowBlockWithIndent(new GUIContent("iOS"))) { UCL_PlatfromsLogSettings.Instance.iOS_LogsRecord = SA_EditorGUILayout.ToggleFiled("Logs Record", UCL_PlatfromsLogSettings.Instance.iOS_LogsRecord, SA_StyledToggle.ToggleType.EnabledDisabled); UCL_PlatfromsLogSettings.Instance.iOS_OverrideLogsOutput = SA_EditorGUILayout.ToggleFiled("Override XCode Output", UCL_PlatfromsLogSettings.Instance.iOS_OverrideLogsOutput, SA_StyledToggle.ToggleType.EnabledDisabled); } using (new SA_WindowBlockWithIndent(new GUIContent("Android"))) { UCL_PlatfromsLogSettings.Instance.Android_LogsRecord = SA_EditorGUILayout.ToggleFiled("Logs Record", UCL_PlatfromsLogSettings.Instance.Android_LogsRecord, SA_StyledToggle.ToggleType.EnabledDisabled); UCL_PlatfromsLogSettings.Instance.Android_OverrideLogsOutput = SA_EditorGUILayout.ToggleFiled("Override LogCat Output", UCL_PlatfromsLogSettings.Instance.Android_OverrideLogsOutput, SA_StyledToggle.ToggleType.EnabledDisabled); } }
protected override void OnServiceUI() { using (new SA_WindowBlockWithSpace(new GUIContent("Editor Testing"))) { EditorGUILayout.HelpBox("Spesifiy contacts book entries that will be used " + "while emulating API inside the editor.", MessageType.Info); SA_EditorGUILayout.ReorderablList(UM_Settings.Instance.EditorTestingContacts, GetContactDisplayName, DrawProductContent, () => { string name = "John Smith"; string phone = "1–800–854–3680"; string email = "*****@*****.**"; var contact = new UM_EditorContact(name, phone, email); UM_Settings.Instance.EditorTestingContacts.Add(contact); }); } }
private void DrawProductContent(AN_Product product) { product.ProductId = SA_EditorGUILayout.TextField(ProductIdDLabel, product.ProductId); product.Title = SA_EditorGUILayout.TextField(DisplayNameLabel, product.Title); product.Type = (AN_ProductType)SA_EditorGUILayout.EnumPopup(ProductType, product.Type); product.IsConsumable = SA_EditorGUILayout.ToggleFiled(ConsumableLabel, product.IsConsumable, SA_StyledToggle.ToggleType.YesNo); product.Price = SA_EditorGUILayout.TextField(PriceLabel, product.Price); EditorGUILayout.LabelField(DescriptionLabel); using (new SA_GuiBeginHorizontal()) { product.Description = EditorGUILayout.TextArea(product.Description, GUILayout.Height(60), GUILayout.MinWidth(190)); EditorGUILayout.Space(); product.Icon = (Texture2D)EditorGUILayout.ObjectField("", product.Icon, typeof(Texture2D), false, GUILayout.Width(75)); } }
public static void Capabilities() { SA_EditorGUILayout.Header("Capabilities"); SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.Capabilities, (ISD_Capability c) => { return(c.CapabilityType.ToString()); }, (ISD_Capability c) => { switch (c.CapabilityType) { case ISD_CapabilityType.PushNotifications: var settings = ISD_Settings.Instance.PushNotificationsCapabilitySettings; settings.Development = SA_EditorGUILayout.ToggleFiled("Development", settings.Development, SA_StyledToggle.ToggleType.YesNo); break; case ISD_CapabilityType.Cloud: var cloudSettings = ISD_Settings.Instance.iCloudCapabilitySettings; cloudSettings.KeyValueStorage = SA_EditorGUILayout.ToggleFiled("Key-value storage", cloudSettings.KeyValueStorage, SA_StyledToggle.ToggleType.EnabledDisabled); cloudSettings.iCloudDocument = SA_EditorGUILayout.ToggleFiled("iCloud Documents", cloudSettings.iCloudDocument, SA_StyledToggle.ToggleType.EnabledDisabled); break; default: EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Entitlements File Path"); c.EntitlementsFilePath = EditorGUILayout.TextField(c.EntitlementsFilePath); EditorGUILayout.EndHorizontal(); c.AddOptionalFramework = SA_EditorGUILayout.ToggleFiled("Add Optional Framework", c.AddOptionalFramework, SA_StyledToggle.ToggleType.YesNo); break; } } ); EditorGUILayout.BeginHorizontal(); s_newCap = (ISD_CapabilityType)EditorGUILayout.EnumPopup(s_newCap); if (GUILayout.Button("Add Capability", GUILayout.Height(20))) { ISD_Capability c = new ISD_Capability(); c.CapabilityType = s_newCap; ISD_Settings.Instance.Capabilities.Add(c); } EditorGUILayout.EndHorizontal(); }
private static void DrawEmbededBlock() { SA_EditorGUILayout.Header("Embedded Frameworks"); SA_EditorGUILayout.ReorderablList(ISD_Settings.Instance.EmbededFrameworks, (ISD_EmbedFramework framework) => { return(framework.FileName); }, (ISD_EmbedFramework freamwork) => { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Asset: "); freamwork.Asset = EditorGUILayout.ObjectField(freamwork.Asset, typeof(UnityEngine.Object), false); EditorGUILayout.EndHorizontal(); }, () => { ISD_Settings.Instance.EmbededFrameworks.Add(new ISD_EmbedFramework()); } ); }
public static void PlistValues() { SA_EditorGUILayout.Header("PLIST VALUES"); EditorGUI.indentLevel++; { foreach (ISD_PlistKey var in ISD_Settings.Instance.PlistVariables) { EditorGUILayout.BeginVertical(GUI.skin.box); DrawPlistVariable(var, (object)var, ISD_Settings.Instance.PlistVariables); EditorGUILayout.EndVertical(); if (!ISD_Settings.Instance.PlistVariables.Contains(var)) { return; } } EditorGUILayout.Space(); } EditorGUI.indentLevel--; EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("New Variable Name"); NewPlistValueName = EditorGUILayout.TextField(NewPlistValueName); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.Space(); if (GUILayout.Button("Add", GUILayout.Width(100))) { if (NewPlistValueName.Length > 0) { ISD_PlistKey var = new ISD_PlistKey(); var.Name = NewPlistValueName; ISD_API.SetInfoPlistKey(var); } NewPlistValueName = string.Empty; } EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.EndVertical(); }