private void OnDisable()
        {
            // Restore and render a default probe
            if (probe != null && probe.isActiveAndEnabled)
            {
                probe.mode        = UnityEngine.Rendering.ReflectionProbeMode.Realtime;
                probe.refreshMode = UnityEngine.Rendering.ReflectionProbeRefreshMode.ViaScripting;
                probe.RenderProbe();
            }

            RenderSettings.skybox = startSky;

            if (directionalLight != null)
            {
                directionalLight.color = startLightColor;
                directionalLight.transform.rotation = startLightRot;
                directionalLight.intensity          = startLightBrightness;
            }

            if (captureCamera != null)
            {
                captureCamera.Shutdown();
            }

            DynamicGI.UpdateEnvironment();
        }
 private void OnDisable()
 {
     cam.Shutdown();
     if (map != null)
     {
         map.Destroy();
     }
 }
        private void OnDisable()
        {
            // Restore and render a default probe
            if (probe != null && probe.isActiveAndEnabled)
            {
                probe.mode        = UnityEngine.Rendering.ReflectionProbeMode.Realtime;
                probe.refreshMode = UnityEngine.Rendering.ReflectionProbeRefreshMode.ViaScripting;
                probe.RenderProbe();
            }

            RenderSettings.skybox = startSky;

            if (captureCamera != null)
            {
                captureCamera.Shutdown();
            }
        }