From c607afae73b21adc34abb44439df94319d7e98c6 Mon Sep 17 00:00:00 2001 From: FxckingAngel <70914843+FxckingAngel@users.noreply.github.com> Date: Sat, 6 Jun 2026 21:26:06 -0500 Subject: [PATCH] Fix stacked camera cleanup order --- .../Runtime/CameraStacking/ClientSimStackedVRCameraSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Runtime/CameraStacking/ClientSimStackedVRCameraSystem.cs b/Source/Runtime/CameraStacking/ClientSimStackedVRCameraSystem.cs index 395c111..6f8cf94 100644 --- a/Source/Runtime/CameraStacking/ClientSimStackedVRCameraSystem.cs +++ b/Source/Runtime/CameraStacking/ClientSimStackedVRCameraSystem.cs @@ -63,7 +63,7 @@ private void CreateCameraStack() private void DestroyCameraStack() { - for (int i = 0; i < _cameras.Count; i++) + for (int i = _cameras.Count - 1; i >= 0; i--) { DestroyCamera(i); } @@ -107,4 +107,4 @@ private void DestroyCamera(int index) Destroy(cam.gameObject); } } -} \ No newline at end of file +}