Memory Question

My game so far, has 23 scenes and about 30-40 materials. Each scene runs about 4000-7000 polys. I’ve been getting Memory warnings on an iPhone 3G when I load the bigger scenes. I’m not sure why. A iPhone reset clears the issue. I’m not sure how long until the iPhone runs with other apps opening and closing before the issue returns.

I wonder if assets are getting loaded into memory that I don’t need. I have a video that plays in scene 0. I originally had it in scene 24, but I guess it was getting preloaded even if I never play the scene because every scene I played was choppy and gave me memory warnings, after I moved it into scene 0, it seemed to solve that issue. So, I’m a led to beleve that other assets maybe loaded into memory that I may not need.

Are all of the materials loaded? Even if you don’t use them for a particular scene? How about sounds? Objects?

Thanks,

only the things that are in the scene + resources are loaded.
But during the transition between scenes you have the situation where data from both ends is still present, which is why many people have a loading screen scene that does nothing but show the loading screen and redirect to the new scene with a loadlevel call to it as that gives you a transition into an empty scene and from an empty into the next full one.

don’t know if thats still required with 1.5 but with 1.0.x it was pretty common to do so

Thanks for the reply,

I will try that tonight. Should I add any kind of wait call for a second or 2, or can I just load the loading scene (with a cool splash), then immediately load the next scene?