Exemple #1
0
 public void OnDestroy()
 {
     m_OnRepaintWindow = null;
     m_FoundIcon       = null;
     m_SearchWidget.OnDestroy();
     m_SearchWidget = null;
     m_SearchHandlers.Clear();
 }
Exemple #2
0
        public void OnEnable()
        {
            m_FoundIcon    = Resources.Load <Texture2D>(string.Format("{0}/{1}", EditorStyles.ThemeFolder, EditorStyles.ICON_NOTIFICATION));
            m_SearchWidget = new SearchWidget <HierarchySearchType>(OnSearch, OnClear, Save);
            m_SearchWidget.SetState(
                EditorPrefsUtils.LoadEnum <HierarchySearchType>(EditorPrefKeys.KEY_SEARCH_TYPE, HierarchySearchType.Component),
                EditorPrefsUtils.LoadString(EditorPrefKeys.KEY_SEARCH_TERM, string.Empty),
                EditorPrefsUtils.LoadBool(EditorPrefKeys.KEY_CASE_SENSITIVE, false),
                EditorPrefsUtils.LoadBool(EditorPrefKeys.KEY_MATCH_WHOLE_WORD, false),
                EditorPrefsUtils.LoadBool(EditorPrefKeys.KEY_INCLUDE_INACTIVE, true));

            EditorApplication.hierarchyWindowItemOnGUI += HierarchyHighlightItem;
        }