void OnGUI() { // This is done so that we can adjust the UI when the user swiches SRP SetupModes(); // reset index to settings page if one of the tabs went away if (m_SelectedModeIndex >= m_Modes.Count) { m_SelectedModeIndex = 0; } Mode selectedMode = m_Modes[m_SelectedModeIndex]; DrawTopBarGUI(selectedMode); switch (selectedMode) { case Mode.LightingSettings: m_LightingSettingsTab.OnGUI(); break; case Mode.RealtimeLightmaps: m_RealtimeLightmapsTab.OnGUI(position); break; case Mode.BakedLightmaps: m_BakedLightmapsTab.OnGUI(position); break; } }
void OnGUI() { // This is done so that we can adjust the UI when the user swiches SRP SetupModes(); lightingSettings.Update(); // reset index to settings page if one of the tabs went away if (m_SelectedModeIndex < 0 || m_SelectedModeIndex >= m_Modes.Count) { m_SelectedModeIndex = 0; } Mode selectedMode = m_Modes[m_SelectedModeIndex]; DrawTopBarGUI(selectedMode); EditorGUILayout.Space(); switch (selectedMode) { case Mode.LightingSettings: m_LightingSettingsTab.OnGUI(); break; case Mode.EnvironmentSettings: m_EnvironmentSettingsTab.OnGUI(); break; case Mode.RealtimeLightmaps: m_RealtimeLightmapsTab.OnGUI(position); break; case Mode.BakedLightmaps: m_BakedLightmapsTab.OnGUI(position); break; } Buttons(selectedMode == Mode.LightingSettings); Summary(); lightingSettings.ApplyModifiedProperties(); }