As you can see here, unloading this scene causes a ridiculously long freeze in my game. A couple things to note:
- This only happens when I bake any scene’s lighting with realtime GI enabled
- This happens to all scenes baked with realtime GI enabled, some lag longer than others
- I am unloading using Addressables.UnloadSceneAsync
Hmm. The call tree doesn’t give away much information. Part of the native portion is probably cut off.
A few questions:
- How big are the scenes you are playing around with?
- If you make a tiny scene with realtime GI enabled (just a few cubes or something), do you still get a big spike?
- What kind of machine are you testing on?
For spikes this long you should file a bug report if this is blocking you. It’s difficult to give better advice without access to the project.
If you want to try troubleshooting further yourself, you can often use a native profiler like Very Sleepy to get a better view of what is going on.
The scenes aren’t that big. They’re a decently small arena that runs on mobile and PC at 60 FPS constant just fine, the only issue is the unloading. When I make a tiny scene, there is no spike. I’m gonna try debugging by slowly adding in geometry from the original scene, and rebaking as I go. I probably will file a bug report if I don’t get good results from that debugging.
Here’s a picture of it for reference
I’ve filed a bug report with all the necessary information and the files for my scene isolated in a test project to make it easily reproducible. IN-85410
1 Like