void OnEnable() { GuiSettings.LoadSettings(); GuiSettings.SettingsGotReloaded = true; NamespaceArray = GuiSettings.NamespacesToIgnoreList == null ? null : GuiSettings.NamespacesToIgnoreList.ToArray(); AttributeArray = GuiSettings.AttributesBehaveLikeDoNotRenameList == null ? null : GuiSettings.AttributesBehaveLikeDoNotRenameList.ToArray(); }
void OnGUI() { try { this.scrollPosition = GUILayout.BeginScrollView(this.scrollPosition, false, false, GUILayout.Width(position.width), GUILayout.Height(position.height)); GUIStyle var_Style = new GUIStyle("button"); var_Style.normal.background = null; var_Style.active.background = null; GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button((Texture)EditorGUIUtility.Load("Assets/OPS/Obfuscator.Free/Editor/Gui/Rate.png"), var_Style, GUILayout.MaxWidth(100), GUILayout.MaxHeight(26))) { Application.OpenURL("https://assetstore.unity.com/packages/tools/utilities/obfuscator-free-89420"); } if (GUILayout.Button((Texture)EditorGUIUtility.Load("Assets/OPS/Obfuscator.Free/Editor/Gui/BugQuestion.png"), var_Style, GUILayout.MaxWidth(200), GUILayout.MaxHeight(26))) { Application.OpenURL("mailto:[email protected]?subject=OPS/Obfuscator.Free_Bug"); } GUILayout.EndHorizontal(); GUILayout.Label((Texture)EditorGUIUtility.Load("Assets/OPS/Obfuscator.Free/Editor/Gui/Texte/Header.png")); EditorGUILayout.HelpBox("De-/Activate Obfuscator here.", MessageType.Info); Row.GuiBold("Obfuscate Globally: ", ref Gui.GuiSettings.ObfuscateGlobally); GUILayout.Space(10); GUI.enabled = Gui.GuiSettings.ObfuscateGlobally; this.tabIndex = GUILayout.Toolbar(this.tabIndex, new Texture[] { (Texture)EditorGUIUtility.Load("Assets/OPS/Obfuscator.Free/Editor/Gui/General_T32x.png"), (Texture)EditorGUIUtility.Load("Assets/OPS/Obfuscator.Free/Editor/Gui/Advanced_T32x.png"), (Texture)EditorGUIUtility.Load("Assets/OPS/Obfuscator.Free/Editor/Gui/Security_T32x.png") }); switch (this.tabIndex) { case 0: { this.GeneralTab(); break; } case 1: { this.AdvancedTab(); break; } case 2: { this.SecurityTab(); break; } } GUI.enabled = true; GUILayout.EndScrollView(); if (GUI.changed) { GuiSettings.SaveSettings(); } } catch (Exception e) { Debug.LogError(e.ToString()); this.Close(); } }
void OnDisable() { GuiSettings.SaveSettings(); }