iOS High Frametime after Application.LoadLevel

Hello, I’m developing a 2D game in Unity 4.6.1.
The Game is for Android and iOS. On Android, presents no problem, but in iOS after restarting the stage several times with “Application.LoadLevel” the frametime on iOS rises causing a lot of lag.

Profiler when I start game:

After restarted the stage a few times:

The code is not showing any errors. I have done processing graphic to improve performance, and yet I still have this problem.

Has anyone experienced this before?

You can split the loaded scenes that have this problem, and load them additively to distribute the overhead.

Hi unimechanic,

It is a very simple scene without many objects, which I use “Application.LoadLevel” to restart. The first ~10 times I restart, it runs smoothly, then begins to lag.

Please submit a bugreport and don’t forget to attach repro project and a list of device models you were testing on.
Thanks!

Maybe something is not being disposed in your scripts?

Maybe something is not being disposed when the level is reloaded? For example using http://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html

You could check in the Unity Profiler: http://docs.unity3d.com/Manual/Profiler.html

Hello Mantas, i reported the bug.

Unimechanic, i don’t remember using “DontDetroyOnLoad”, but I will check. thanks.