void OnCameraModeChanged(SceneView.CameraMode mode) { // If the rootVisualElement hasn't yet been created, early out if (m_ContentRoot == null) { CreatePanelContent(); } m_AlbedoContent.EnableInClassList(k_UnityHiddenClass, mode.drawMode != DrawCameraMode.ValidateAlbedo && mode.drawMode != DrawCameraMode.ValidateMetalSpecular); m_AlbedoContent.Q("Albedo").EnableInClassList(k_UnityHiddenClass, mode.drawMode != DrawCameraMode.ValidateAlbedo); m_LightExposureContent.EnableInClassList(k_UnityHiddenClass, !sceneView.showExposureSettings); m_GlobalIlluminationContent.EnableInClassList(k_UnityHiddenClass, mode.drawMode != DrawCameraMode.GIContributorsReceivers); m_ShouldDisplay = true; switch (mode.drawMode) { case DrawCameraMode.ValidateAlbedo: case DrawCameraMode.ValidateMetalSpecular: displayName = "PBR Validation Settings"; m_AlbedoContent.Q <HelpBox>().EnableInClassList(k_UnityHiddenClass, PlayerSettings.colorSpace != ColorSpace.Gamma); m_SceneView.SetOverlayVisible(k_OverlayID, true); break; case DrawCameraMode.BakedEmissive: case DrawCameraMode.BakedLightmap: case DrawCameraMode.RealtimeEmissive: case DrawCameraMode.RealtimeIndirect: displayName = "Lightmap Exposure"; m_SceneView.SetOverlayVisible(k_OverlayID, true); break; case DrawCameraMode.GIContributorsReceivers: displayName = "GI Contributors / Receivers"; break; default: m_ShouldDisplay = false; break; } UpdateAlbedoMetalValidation(); Handles.SetSceneViewModeGIContributorsReceiversColors( kSceneViewMaterialNoContributeGI.Color, kSceneViewMaterialReceiveGILightmaps.Color, kSceneViewMaterialReceiveGILightProbes.Color); }