-
Notifications
You must be signed in to change notification settings - Fork 13
fix: hot-reload broken VCam apply retry #4315
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
Conversation
…UnusedAssets() call
…as not found on the target crdt entity on that frame
Windows and Mac build successful in Unity Cloud! You can find a link to the downloadable artifact below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️ PR reviewed and approved by QA on both platforms following instructions playing both happy and un-happy path
Regressions for this ticket had been performed in order to verify that the normal flow is working as expected:
- [✔️ ] Backpack and wearables in world
- [✔️] Emotes in world and in backpack
- [✔️ ] Teleport with map/coordinates/Jump In
- [✔️ ] Profile card
- [✔️ ] Camera
- [ ✔️] Skybox
- [✔️ ] Settings
WHY
I encountered these
3bugs that affect creators dev-exp + unity devs dev-exp:Since recently, during the hot-reload of a local scene, Unity may crash randomly while the scene reloads.Since recently, during hot-reload of a local scene, Unity may end up throwingObjectDisposedException
infinitelyVirtual Camera breaking after hot-reload (3.) demo (second
0:11
)Screen.Recording.2025-06-02.at.1.24.20.PM.mp4
WHAT
Fixed Unity Editor crash when hot-reloading a scene by placing theResources.UnloadUnusedAssets();
call during LSD to be called AFTER we waited for the scene to reload. I guess that maybe some unused assets may be getting re-used during theWaitUntilNewSceneIsFullyLoadedAsync()
and that may be why it exploded there.Fixed theObjectDisposedException
infinite throwing observed during hot-reload by adding a check to know if the token is able to be Cancelled.MainCameraSystem
retries when the target CRDT Entity didn't have thePBVirtualCamera
component yet.TEST INTSTRUCTIONS
npm i
and thennpm run start -- --explorer-alpha
index.ts
file of the scene that you have running (ideally in a different monitor)const CHANGE_THIS_VALUE_FOR_HOT_RELOAD = 1
(that's in theindex.ts
file) value to any different number to trigger a hot-reload of the scene in the Explorer -> Confirm that the scene has been automatically reloaded (hot-reload) and that the Camera is again put as a TOP DOWN camera.