Android VR project crashes when loading into a level

Hello,

I’m currently working on a port of a VR experience to update the underlying systems and to go from version 5.2 to 5.6

Currently I’m encountering an issue where the packaged project crashes when loading back into a main hub world after having completed a level which the user previously entered through the hub world.

I believe this is down to an overuse of memory caused by the different lightmaps. I’m using level streaming to unload the current level and load the next. Each level was opened individually and built, then combined in a Main level which the levels are loaded from. If I build the levels in the main level with the other hidden the game crashes when loading into the level for the first time. If I build with all the levels visible, the game does not crash (Though this is unideal as lighting from different levels is baked together). It’s also worth mentioning that the game doesnt crash when loading from one particular level, this level having a significantly smaller environment than the others.

All the above has lead me to conclude that somehow loading in the hub is loading in a lightmap that over-fills the alocated streaming pool, although I’m confused on why this would be. Currently i’m unloading the current level, followed by a 5 second delay then loading the hub world. I’ve also used the “Execute console command” node to increase the streaming pool size to 4000 and to manually flush the streaming pool and call the carbage collector (Although this was advice taken from the ever fallible AI Dev Assistant)

If anyone has advice to optimize the size of a lightmap, any other ways which I can unload and load levels with a persistant element at a comparable performance cost or has any alternate reasons why this occuring, please let me know.

Thank you