public static void TeardownSmoothedCamera() { Main.Log("[SmoothCamera] >>> Tearing down camera..."); var smoothCam = GameObject.Find("SmoothCamera"); if (smoothCam == null) { Main.LogWarning("[SmoothCamera] >>> SmoothCamera not found. Skipping camera teardown."); return; } VegetationSystemPro veggieSys = UnityEngine.Object.FindObjectOfType <VegetationSystemPro>(); veggieSys.RemoveCamera(smoothCam.GetComponent <Camera>()); XRSettings.gameViewRenderMode = defaultGameViewRenderMode; Destroy(smoothCam); }