Android Instantiate Problem

Hi, I have been developing a rather large game for a while now and have only been testing on the iPhone / iPad which has worked 100% of the time. Now I am testing it out on a Android (Motorola Xoom) and am getting some funny results on the device.

I have the following scenes in the “Scenes In Build” list:
Main Menu
Level 1
Level 2
Loading 1
Loading 2 (was easier just to setup a new scene for this, don’t ask)

Problem:
When I load in Level 1 (which is 10 times the size of Level 2) from Main Menu it works great, 30 FPS all the time. Then when I try to load in Level 2 from the Main Menu, once the level loads anything that I Instantiate freezes the device for at least 2 - 3 seconds minimum. Be it a small bullet or 4 enemies at once. Doesn’t matter if I load in Level 2 first then Level 1 it still happens.

Now here is the funny part. If I move the order in which the levels are in the “Scene In Build” list so that Level 2 is higher / above Level 1 then the opposite happens. Level 2 now runs at 30 FPS all the time and Level 1 freezes the device for 2 - 3 seconds on every single Instantiate. I have also tried different Android devices too.

Please, could someone guide me in the right direction on how to solve this as I’m weeks away from release and it has been a loooooooonnnnnggg development cycle :slight_smile:

I’m running basic iOS and basic Android … not sure if Pro would fix this?

Thanks for anyone who can help!

Are you maybe doing that dont destroy call stuff? sounds like both are in memory somehow maybe?

I’ve search all through my millions of scripts and can’t seem to find any reference of it. Is there a call to “force” unload a scene to make sure everything is deleted?

This is a known android issue I think. Ive had similar problems with a project we have been developing on.

Yeah, we are currently having this issue as well, which is tied in to just a general slowness when instantiating objects either on scene load or at runtime. You can see a fairly long post about this here:

http://forum.unity3d.com/threads/70844-Extremely-slow-scene-loading-with-Unity-Android