Skip to content

Fix stacked camera cleanup order#138

Closed
FxckingAngel wants to merge 1 commit into
vrchat-community:mainfrom
FxckingAngel:fix-camera-stack-cleanup
Closed

Fix stacked camera cleanup order#138
FxckingAngel wants to merge 1 commit into
vrchat-community:mainfrom
FxckingAngel:fix-camera-stack-cleanup

Conversation

@FxckingAngel

Copy link
Copy Markdown

Summary

  • Fix stacked camera teardown so every camera in the stack is destroyed.
  • Iterate backwards when removing cameras from the backing list.

Why

DestroyCameraStack previously iterated forward while DestroyCamera removed entries from _cameras. With more than one stacked camera, removing index 0 shifts the next camera down and the loop can skip it, leaving a camera GameObject alive after teardown.

This keeps cleanup deterministic and avoids leaving extra cameras/rendering work around after the stacked camera system is disabled.

Testing

  • Not run locally; this repository snapshot does not include a runnable Unity test project in main.

Related to #95.

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@FxckingAngel

Copy link
Copy Markdown
Author

Closing this for now while I revise the approach.

@github-actions github-actions Bot locked and limited conversation to collaborators Jun 7, 2026
@FxckingAngel FxckingAngel deleted the fix-camera-stack-cleanup branch June 7, 2026 02:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant