private static void RemoveOverCloud() { GameObject overCloudPrefab = GameObject.Find("OverCloud"); if (overCloudPrefab != null) { GameObject.DestroyImmediate(overCloudPrefab); } Camera mainCamera = GaiaUtils.GetCamera(); if (mainCamera != null) { OverCloudCamera ocCamera = mainCamera.gameObject.GetComponent <OverCloudCamera>(); if (ocCamera != null) { GameObject.DestroyImmediate(ocCamera); } } if (GaiaUtils.CheckIfSceneProfileExists()) { GaiaGlobal.Instance.SceneProfile.m_waterSystemMode = GaiaConstants.GlobalSystemMode.Gaia; GaiaSettings gaiaSettings = GaiaUtils.GetGaiaSettings(); if (gaiaSettings != null) { UnityPipelineProfile pipelineProfile = gaiaSettings.m_pipelineProfile; if (pipelineProfile != null) { GaiaLighting.GetProfile(GaiaGlobal.Instance.SceneProfile, pipelineProfile, GaiaUtils.GetActivePipeline()); } } } }