- Home /
Why my game's FPS drop every time I change scene (Android Game) ?
Hello, I have a very weird problem. Every time I load my game on my android phone it seems to work greak with 54 to 56 FPS. But when I am loading another scene and return back to my previous scene the FPS drop to 38 - 40. My game has a mane scene where is the game paused and when I press the screen the game starts. That's my starting screen, but when I load another scene and return back I get this problem. Moreover all gameobjects reset when I am changing scene I am not keeping anything with DontDestroyOnLoad(). Any idia what may cause this?
If you're "not keeping anything with DontDestroyOnLoad()" surely everything will then get destroyed - hence everything reset when a scene is re/loaded. If on the other hand that (not) was a typo, then when you reload the screen you will have the undestroyed item and the newly initialised item (from loading the scene again) - but unless you have held on to the original object handle/(s), the data will seem to have reset... you would in fact be looking at the new version of the item. The duplication of objects could then be slowing down the game? Just a guess
How is it behaving inside the editor? Is it using more memory after you change the scene back? If it does then you might have some references of Objects which can't be garbage collected. This is called a memory leak. This is hard to track down especially when you're not used to manual memory management.
Answer by man007 · Nov 12, 2014 at 05:42 PM
Ok, I fixed it. The problem was that every time a scene was loaded a banner ad was created but the banner was never destroyed.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Aiming down a gun 1 Answer
unity free selling game in android market 1 Answer