We are working on a project for the Oculus Quest 2. In the project, we have multiple scenes with different objects, which are loaded async. Some of the objects inside these scenes are set to static that the meshes are combined to a
CombinedMesh when the game is loaded.
Now when we switch a level, unload all scenes except the player and load the new scenes for another level, the
CombinedMeshes won’t get released/destroyed and after multiple scene changes the memory of the quest is full and the game crashes.
When I take a screenshot in the Memory Profiler after some level changes, you can see that some
CombinedMeshes are generated multiple times and only one of these posesses any references.
How can I make sure, that Meshes are released/destroyed when the scene gets unloaded?