Hello! Yes, this is a hackneyed topic, but I need to ask you.
The situation is as follows. I can play my game for about 5-10 minutes at a high FPS of the order of 54-57, but after the expiration of the time FPS drops to 26-30. Tell me, what could it be?
The problem I have for a long time, I read a lot of forums wrote a script that disables \ includes half of the scripts on different objects, in general while I was looking for a solution to my problem I was able to increase the performance of the game from 34 FPS to 54, but it did not solve the problem. If earlier I played 34 FPS, it dropped to 18-20 in 5-10 minutes, and now having FPS 54-57 drops to 26-30. For many objects, I turn off my scripts, animations, mesh, NavMeshAgents, but the problem is not solved. Triangles on the screen in the statistics show Tris: 100-120k, I use mobile shaders, many objects use one texture, in general all fenushuyu. The only thing that the network game I have, but I also disconnect many network scripts when different objects are at a distance.
Who did for androids game please tell me if you had such problems? I’m sinning maybe the phone stupidly gets warm and therefore begins to throw off the FPS? But restarting the game helps.
And maybe in the game some garbage is accumulating and clogging something in memory for example some and it sometimes needs to be cleaned? I for a long time did not dare to make a topic on the forum as I thought I could manage it myself, but I’ve already exhausted all options.
And can it be still that my app hangs almost 100 MB (although the problems got used when the size still about 55 MB hung)? I do not want to break the game yet. I often do new test versions, but it seems to me that the cache also needs to be dropped every time, then all the testers (I did not understand it yet).
The most likely cause is thermal throttling - the phone gets too hot, so it tries to combat that by reducing performance.
Though one thing you’ve said intrigues me - it’s okay after a restart? For how long? If it’s only for a few minutes then it’s thermal throttling, but if it takes 10 minutes until the performance drops again - we could be looking at a different issue.
Depending on your game, you could also try and run at a capped framerate of 30 fps, which might be less taxing on the phone.
Dear forum users! I hasten to share with you what I learned and how I decided.
In general, the drawdown was due to the fact that the device was heated after a while. To make sure of this when the next drawdown of FPS began I put the phone in the refrigerator for a few minutes that it would cool down when I took out his cold FPS were good 41-45.
I blocked the FPS count in the game with the help of “Application.targetFrameRate” at 30, and the game has been working steadily for a long time, it happens there is a drawdown for a fraction of seconds to 25-27, but then returns to 30.