Your game may run perfectly on your development phone and still struggle on the budget devices many of your players own. Performance work is part of making a good game, so plan for it from the start.
Measure before you optimize
Use the Unity Profiler on a real, lower-end device instead of the editor. Find out whether the CPU or the GPU is the limit, because the fixes are very different.
Reduce draw calls
- Combine sprites into atlases
- Share materials between objects where possible
- Use static batching or GPU instancing for repeated objects
Control memory and garbage collection
Allocating memory during gameplay causes garbage collection, which players feel as stutter.
- Reuse bullets, enemies and effects through object pooling
- Avoid creating new strings and lists inside
Update - Cache component references instead of looking them up every frame
Be careful with UI
Unity rebuilds a whole Canvas when one element changes. Move frequently changing elements, such as a score, onto their own Canvas. Disable Raycast Target on anything that does not need touch input.
Keep the download small
- Compress textures with ASTC where supported
- Compress audio and stream long tracks
- Consider Addressables so that larger content downloads later
Watch battery and heat
Phones slow themselves down as they heat up, so a game that starts smoothly can drop frames after ten minutes. Test long sessions, and consider a 30 FPS option for games that do not need more.
Need help with a game that is struggling? Our Unity game team can review your project and start with the biggest problems.