Exemplo n.º 1
0
        private void Init()
        {
            m_Providers = SettingsService.FetchSettingsProviders().Where(p => p.scope == m_Scope).ToArray();

            WarnAgainstDuplicates();

            foreach (var provider in m_Providers)
            {
                provider.settingsWindow = this;
                if (!provider.icon)
                {
                    provider.icon = EditorGUIUtility.FindTexture("UnityEditor/EditorSettings Icon");
                }
            }

            m_TreeViewState         = m_TreeViewState ?? new TreeViewState();
            m_TreeView              = new SettingsTreeView(m_TreeViewState, m_Providers);
            m_TreeView.searchString = m_SearchText = m_SearchText ?? string.Empty;
            RestoreSelection();
            m_TreeView.currentProviderChanged += ProviderChanged;
        }
Exemplo n.º 2
0
        private void Init()
        {
            m_Providers = SettingsService.FetchSettingsProviders().Where(p => (p.scopes & m_Scopes) != 0).ToArray();

            WarnAgainstDuplicates();

            m_SplitterFlex = EditorPrefs.GetFloat(GetPrefKeyName(nameof(m_Splitter)), m_SplitterFlex);

            foreach (var provider in m_Providers)
            {
                provider.settingsWindow = this;
                if (!provider.icon)
                {
                    provider.icon = EditorGUIUtility.FindTexture("UnityEditor/EditorSettings Icon");
                }
            }

            m_TreeView = new SettingsTreeView(m_Providers);
            m_TreeView.currentProviderChanged += ProviderChanged;
            m_SearchText = String.Empty;

            RestoreSelection();
        }