Hi, all,
My game is getting very close to completion, and uses the standard progression model suggested in Unity games:
Level 1 → Loader Scene → Level 2 → Loader Scene → Level n
The problem is that as I play further into the game, the frame-rate drops, even though all the scenes are based on the same “core” scene.
This doesn’t appear to be due to a memory leak (I have code to check the components in memory during the loading scene, and it’s not progressively rising), it’s not use of static variables (I have none), it’s not due to instantiating objects (I use object pools), it’s not due to loaded resources (everything that is loaded is unloaded in the “OnDestroy” functions.
At first, I thought it was something to do with the geometry on the level in question, but it turns out that if I do a clean run of the game, access the levels where I see slowdown first, the slowdown does not occur
I’m pretty sure this isn’t a memory issue either - this problem is principally seen on iPod Touch 3rd Gen, but the game never uses more than 70mb (at a spike), and usually runs within 65mb.
Recently, I’ve tried looking for other potential issues, like problems with pre-caching textures, so set up “Cache cameras” at the start of each stage, but this hasn’t affected anything.
Anyone have any ideas?
Cheers,
SB