private void OnEnable() { instance = this; lookInOption = (FindReplace_LookIn)EditorPrefs.GetInt("FlipbookGames.ScriptInspector.FindReplace.LookIn", 0); lookForOption = (FindReplace_LookFor)EditorPrefs.GetInt("FlipbookGames.ScriptInspector.FindReplace.LookFor", 0); matchCase = EditorPrefs.GetBool("FlipbookGames.ScriptInspector.FindReplace.MatchCase", false); matchWholeWord = EditorPrefs.GetBool("FlipbookGames.ScriptInspector.FindReplace.MatchWholeWord", false); listResultsInNewWindow = EditorPrefs.GetBool("FlipbookGames.ScriptInspector.FindReplace.ListResultsInNewWindow", false); #if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 title = "Find Text"; #else titleContent.text = "Find Text"; #endif minSize = new Vector2(fixedWidth, fixedHeightFind); maxSize = new Vector2(fixedWidth, fixedHeightFind); Repaint(); for (var i = 0; i < searchHistory.Length; i++) { searchHistory[i] = EditorPrefs.GetString("FlipbookGames.ScriptInspector.SearchHistory_" + i.ToString()); if (searchHistory[i] == "") { searchHistory[i] = null; break; } } }
private void OnDisable() { EditorPrefs.SetInt("FlipbookGames.ScriptInspector.FindReplace.LookIn", (int)lookInOption); EditorPrefs.SetInt("FlipbookGames.ScriptInspector.FindReplace.LookFor", (int)lookForOption); EditorPrefs.SetBool("FlipbookGames.ScriptInspector.FindReplace.MatchCase", matchCase); EditorPrefs.SetBool("FlipbookGames.ScriptInspector.FindReplace.MatchWholeWord", matchWholeWord); EditorPrefs.SetBool("FlipbookGames.ScriptInspector.FindReplace.ListResultsInNewWindow", listResultsInNewWindow); instance = null; if (editor != null && editor.OwnerWindow) { editor.OwnerWindow.Focus(); } }
private void OnDisable() { EditorPrefs.SetInt("FlipbookGames.ScriptInspector.FindReplace.LookIn", (int) lookInOption); EditorPrefs.SetInt("FlipbookGames.ScriptInspector.FindReplace.LookFor", (int) lookForOption); EditorPrefs.SetBool("FlipbookGames.ScriptInspector.FindReplace.MatchCase", matchCase); EditorPrefs.SetBool("FlipbookGames.ScriptInspector.FindReplace.MatchWholeWord", matchWholeWord); EditorPrefs.SetBool("FlipbookGames.ScriptInspector.FindReplace.ListResultsInNewWindow", listResultsInNewWindow); instance = null; if (editor != null && editor.OwnerWindow) editor.OwnerWindow.Focus(); else if (ownerWindow) ownerWindow.Focus(); }
private void OnEnable() { instance = this; lookInOption = (FindReplace_LookIn) EditorPrefs.GetInt("FlipbookGames.ScriptInspector.FindReplace.LookIn", 0); lookForOption = (FindReplace_LookFor) EditorPrefs.GetInt("FlipbookGames.ScriptInspector.FindReplace.LookFor", 0); matchCase = EditorPrefs.GetBool("FlipbookGames.ScriptInspector.FindReplace.MatchCase", false); matchWholeWord = EditorPrefs.GetBool("FlipbookGames.ScriptInspector.FindReplace.MatchWholeWord", false); listResultsInNewWindow = EditorPrefs.GetBool("FlipbookGames.ScriptInspector.FindReplace.ListResultsInNewWindow", false); #if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_5_0 title = "Find Text"; #else titleContent.text = "Find Text"; #endif minSize = new Vector2(fixedWidth, fixedHeightFind); maxSize = new Vector2(fixedWidth, fixedHeightFind); Repaint(); for (var i = 0; i < searchHistory.Length; i++) { searchHistory[i] = EditorPrefs.GetString("FlipbookGames.ScriptInspector.SearchHistory_" + i.ToString()); if (searchHistory[i] == "") { searchHistory[i] = null; break; } } for (var i = 0; i < replaceHistory.Length; i++) { replaceHistory[i] = EditorPrefs.GetString("FlipbookGames.ScriptInspector.ReplaceHistory_" + i.ToString()); if (replaceHistory[i] == "") { replaceHistory[i] = null; break; } } }