Hi
I’m trying to implement the new iPod music player into our game using the Enhancement Pack but am having issues with the game crashing due to running out of memory when i launch the player.
The music player requires about 20MB free to run and due to our menu scene running at 27MB I use a blank launching scene to open the music player (i actually use a blank scene before this launching scene to try and clear the memory). However, i’m finding that using a blank scene only drops the memory down to around 22MB which is not safe enough to be launching the music player (it crashes about 50% of the time due to memory shortages).
So, my first question is there any techniques for releasing more memory, other than having a blank scene. I’m using the Application.GarbageCollectUnusedAssets(); function when loading new scenes and have read around on the forums but can’t find any other releveant info. Why would a blank scene require 22MB of memory - I know that Unity has large overheads and I expect around 10-15MB from reading other people’s experiences.
Next problem is, when I do get the music player to work and then return to the game and play it with a music track running the playback is severely affected with very jerky movement. The odd thing is if i start a music track before I launch the game then it plays fine. Any ideas as to why this may be?
Also, on a slight sidenote, i’m looking at getting an iPhone 3GS for testing on. Does this have more memory available to apps - i read soemwhere it has double the memory but then in other places no mention of any difference to my current iPod 2G. The reason I ask is we’re considering making the iPod music player only available to iPhone 3GS users.
Thanks for any help
Paul