public override void OnGUI() { EditorGUILayout.Space(); EditorGUILayout.HelpBox(DESCRIBTION, MessageType.Info); GUILayout.Space(10f); GUILayout.BeginHorizontal(); GUILayout.BeginVertical(GUILayout.Width(525)); GUILayout.BeginHorizontal(); GUILayout.Label("Ignored Classes", SA_EditorStyles.OLTitle, GUILayout.ExpandWidth(true)); Texture2D trash = SA_Skin.GetGenericIcon("trash.png"); bool remove = GUILayout.Button(trash, SA_EditorStyles.OLTitle, GUILayout.Width(20), GUILayout.Height(20)); if (remove) { UCL_Settings.Instance.IgnoredWrapperClasses.Remove(m_selectedWrapper); } GUILayout.EndHorizontal(); m_scrollPos = GUILayout.BeginScrollView(m_scrollPos, SA_EditorStyles.OLBox); foreach (var wrapper in UCL_Settings.Instance.IgnoredWrapperClasses) { if (GUILayout.Toggle(m_selectedWrapper == wrapper, wrapper, SA_EditorStyles.PreferencesKeysElement)) { m_selectedWrapper = wrapper; } } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.Space(10f); GUILayout.EndHorizontal(); GUILayout.Space(5f); bool restoreDefaults = GUILayout.Button("Restore Defaults", GUILayout.Width(150)); if (restoreDefaults) { UCL_Settings.Instance.IgnoredWrapperClasses.Clear(); } }
//-------------------------------------- // Initialization //-------------------------------------- protected override void OnAwake() { SetHeaderTitle(UM_Settings.PLUGIN_NAME); SetHeaderVersion(UM_Settings.FormattedVersion); SetHeaderDescription(DESCRIPTION); SetDocumentationUrl(UM_Settings.DOCUMENTATION_URL); var backIcon = SA_Skin.GetGenericIcon("back.png"); m_backLink = new SA_HyperLabel(new GUIContent("Back", backIcon), EditorStyles.miniLabel); m_backLink.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor); UpdateToolBarByPluginIndex(); }
protected override void OnAwake() { SetHeaderTitle(ISN_Settings.PLUGIN_NAME); SetHeaderDescription(DESCRIPTION); SetHeaderVersion(ISN_Settings.FormattedVersion); SetDocumentationUrl(ISN_Settings.DOCUMENTATION_URL); m_servicesTab = CreateInstance <ISN_ServicesTab>(); AddMenuItem("SERVICES", m_servicesTab); AddMenuItem("XCODE", CreateInstance <ISN_XCodeTab>()); AddMenuItem("SETTINGS", CreateInstance <ISN_SettingsTab>()); AddMenuItem("ABOUT", CreateInstance <SA_PluginAboutLayout>()); var backIcon = SA_Skin.GetGenericIcon("back.png"); m_backLink = new SA_HyperLabel(new GUIContent("Back To Services", backIcon), EditorStyles.miniLabel); m_backLink.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor); }
public override void OnGUI() { using (new SA_WindowBlockWithSpace(new GUIContent("Log Level"))) { EditorGUILayout.HelpBox("We recommend you to keep full logging level while your project in development mode. " + "Full communication logs between Native plugin part & " + "Unity side will be only available with Info logging level enabled. \n" + "Disabling the error logs isn't recommended.", MessageType.Info); using (new SA_GuiBeginHorizontal()) { var logLevel = AN_Settings.Instance.LogLevel; logLevel.Info = GUILayout.Toggle(logLevel.Info, Info, GUILayout.Width(80)); logLevel.Warning = GUILayout.Toggle(logLevel.Warning, Warnings, GUILayout.Width(100)); logLevel.Error = GUILayout.Toggle(logLevel.Error, Errors, GUILayout.Width(100)); } EditorGUILayout.Space(); EditorGUILayout.HelpBox("On some Android devices, Log.d or Log.e methods will not print anything to console," + "so sometimes the only ability to see the logs is to enable the WTF printing. This will make all" + "logs to be printed with Log.wtf method despite message log level.", MessageType.Info); AN_Settings.Instance.WTFLogging = GUILayout.Toggle(AN_Settings.Instance.WTFLogging, "WTF Logging", GUILayout.Width(130)); } using (new SA_WindowBlockWithSpace(new GUIContent("Environment Management"))) { EditorGUILayout.HelpBox("The Android Native plugin will alter manifest " + "automatically for your convenience. But in case you want to do it manually, " + "you may un-toggle the checkbox below \n" + "The plugin manifest is located under: " + AN_Settings.ANDROID_CORE_LIB_PATH, MessageType.Info); AN_Settings.Instance.ManifestManagement = SA_EditorGUILayout.ToggleFiled("Auto Manifest Management", AN_Settings.Instance.ManifestManagement, SA_StyledToggle.ToggleType.EnabledDisabled); EditorGUILayout.Space(); EditorGUILayout.HelpBox("The Android Resolver plugin will download and integrate Android library dependencies " + "and handle any conflicts between plugins that share the same dependencies. \n" + "The Resolver is an additional third-party plugin. You need to download, install and configure it" + "Before Android Native will able to rely on this plugin and disable internal libraries.", MessageType.Info); using (new SA_GuiBeginHorizontal()) { GUILayout.Label(UnityJarResolverText, GUILayout.MaxWidth(120)); if (AN_Settings.Instance.UseUnityJarResolver) { if (AN_Settings.Instance.UnityJarResolverVersion != null && AN_Settings.Instance.UnityJarResolverVersion.Length > 0) { UnityJarResolverState = new GUIContent("version " + AN_Settings.Instance.UnityJarResolverVersion, "Version of current Jar Resolver."); } else { UnityJarResolverState = new GUIContent("Enabled"); } } else { UnityJarResolverState = new GUIContent("Disabled"); } GUILayout.Label(UnityJarResolverState, GUILayout.MaxWidth(100)); GUILayout.FlexibleSpace(); GUIContent restartResolveContent = new GUIContent(" Restart Resolver", SA_Skin.GetGenericIcon("refresh.png")); var pressed = GUILayout.Button(restartResolveContent, new GUILayoutOption[2] { GUILayout.Width(140), GUILayout.Height(15) }); if (pressed) { AN_ResolveManager.ProcessAssets(); GUIUtility.ExitGUI(); } } using (new SA_GuiBeginHorizontal()) { GUILayout.FlexibleSpace(); var click = m_JarResolverLink.DrawWithCalcSize(); if (click) { Application.OpenURL(JAR_RESOLVER_DOC_LINK); } } } using (new SA_WindowBlockWithSpace("Storage")) { EditorGUILayout.HelpBox("When plugin needs to have a valid URI for an image, " + "it can be saved using the Internal or External storage. " + "In case saving attempt is failed, an alternative option will be used. " + "You can define if Internal or External storage should be a preferred option.", MessageType.Info); AN_Settings.Instance.PreferredImagesStorage = (AN_Settings.StorageType)SA_EditorGUILayout.EnumPopup("Preferred Images Storage", AN_Settings.Instance.PreferredImagesStorage); using (new SA_GuiBeginHorizontal()) { GUILayout.FlexibleSpace(); var click = m_StorageOptionsLink.DrawWithCalcSize(); if (click) { Application.OpenURL(STORAGE_OPTIONS_DOC_LINK); } } } using (new SA_WindowBlockWithSpace("Debug")) { EditorGUILayout.HelpBox("API Resolver's are normally launched with build pre-process stage", MessageType.Info); var pressed = GUILayout.Button("Start API Resolvers"); if (pressed) { SA_PluginsEditor.DisableLibstAtPath(AN_Settings.ANDROID_FOLDER_DISABLED); AN_Preprocessor.Resolve(); GUIUtility.ExitGUI(); } EditorGUILayout.HelpBox("Action will reset all of the plugin settings to default.", MessageType.Info); pressed = GUILayout.Button("Reset To Defaults"); if (pressed) { AN_Settings.Delete(); AN_Preprocessor.Resolve(); } } }