private void ProviderChanged(SettingsProvider lastSelectedProvider, SettingsProvider newlySelectedProvider) { if (m_SettingsPanel == null) { return; } m_ProviderChanging = true; lastSelectedProvider?.OnDeactivate(); m_SettingsPanel.Clear(); if (newlySelectedProvider != null) { newlySelectedProvider?.OnActivate(m_SearchText, m_SettingsPanel); EditorPrefs.SetString(GetPrefKeyName(titleContent.text + "_current_provider"), newlySelectedProvider.settingsPath); } SetupIMGUIForCurrentProviderIfNeeded(); m_ProviderChanging = false; }
private void ProviderChanged(SettingsProvider lastSelectedProvider, SettingsProvider newlySelectedProvider) { if (m_SettingsPanel == null) { return; } lastSelectedProvider?.OnDeactivate(); m_SettingsPanel.Clear(); if (newlySelectedProvider != null) { newlySelectedProvider?.OnActivate(m_SearchText, m_SettingsPanel); EditorPrefs.SetString(GetPrefKeyName(titleContent.text + "_current_provider"), newlySelectedProvider.settingsPath); } if (m_SettingsPanel.childCount == 0) { var imguiContainer = new IMGUIContainer(DrawSettingsPanel); imguiContainer.AddToClassList("settings-panel-imgui-container"); m_SettingsPanel.Add(imguiContainer); } }