Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scene must be reset when fast switching #4596

Merged

Conversation

rawnsley
Copy link
Contributor

@rawnsley rawnsley commented Sep 1, 2021

A number of components expect the reset_scene event to fire when the scene is changed as seen in the hub refresh handler. The fast scene change code didn't include this event, so some components were not given a chance to reset. This leads to warnings in the console regarding duplicate navigation meshes, residual fog from previous scenes, and possibly some spatial audio issues.

The scene in this example room has fog and if you follow either of the links to this room the fog remains despite it not being defined.

Copy link
Contributor

@netpro2k netpro2k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an argument to be had for just putting this in updateEnvironmentForHub but I think I prefer it being outside like this, and we call it from very few places (one of which is intentionally not emitting this event.

@johnshaughnessy johnshaughnessy merged commit 039b9c4 into Hubs-Foundation:master Sep 3, 2021
@rawnsley rawnsley deleted the fast-switch-scene-reset branch September 6, 2021 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants