- Home /
My android game freezes if I don't touch for 2 min
I am making a game for android and if I don't touch it for 2 min, it freezes everything and stop working. Any idea why?
Answer by RebelsoftOFFICIAL · Dec 21, 2020 at 07:09 AM
Did this started occurring since your last update or earlier? If so, check what your last updates are. Maybe you have done something in your update function that is really heavy (like GetComponent calls, they need to be in the start function because you only need them once), maybe you did change something in the graphics like shadows (they are really heavy. It might be a good idea to research what happens behind the scenes).
Those are a few things that I can think of because you are working on a really low spec device. Also, Unity does the most Garbage collection for you, so I am not sure what you need to do to get memory leaks. But with the small amount of information you give us, I can't really think of any other solutions.
Good luck! And please, let us know what you did before you got the crash. This will make it easier for us to help you.
~ Xavier.
Your answer
Follow this Question
Related Questions
How to integrate a Unity game into an Android app? 0 Answers
How to port game on android wear ? 2 Answers
Unable to instantiate UnityPlayerActivity 1 Answer
Unity2D quads not appearing in front of other quads in Android build 1 Answer
Failed to find Build Tools revision 29.0.0 - Android Builds 4 Answers