Building Performant Mobile Games with Unity: Lessons Learned
In this article
The Performance Challenge
Mobile game development is fundamentally different from desktop or console. You're working with thermal constraints, limited memory, and a wide range of device capabilities. After years of shipping mobile games, I've developed a systematic approach to performance optimization.
Start with a Performance Budget
Before writing a single line of game logic, establish your performance budget. For a typical Unity mobile game aiming for 60fps on mid-range devices:
· **Draw calls**: < 50 per frame
· **Triangles**: < 50K visible per frame
· **Texture memory**: < 150MB total
· **Script execution**: < 10ms per frame
· **GC allocations**: Zero per-frame allocations
Profiling First, Optimizing Second
The biggest mistake I see is premature optimization. Use Unity's Profiler aggressively. I typically profile on the target device from day one of development — not just during the optimization phase.
Object Pooling Done Right
Always pool these:
· Bullets and projectiles
· Particle effects
· UI elements in scroll lists
· Enemy/NPC instances
Don't pool objects that are created once and live forever. Over-pooling adds complexity without benefits.
Texture Atlasing and Batching
Dynamic batching in Unity works well but has strict limits (~300 vertices per batch on older devices). Sprite atlases are non-negotiable for 2D games — they reduce draw calls dramatically and are straightforward to set up.
Pro tip: Use TexturePacker or Unity's built-in Sprite Atlas system. Group sprites that appear together in the same scene.
The Shader Sweet Spot
Custom shaders are powerful but easy to overdo. For mobile:
· Use the **Universal Render Pipeline (URP)** by default
· Avoid complex per-pixel calculations
· Prefer Shader Graph for prototyping, hand-written HLSL for shipping
· Always test on the lowest-tier device in your target range
Frame Pacing on Android
Android's frame pacing can be inconsistent. Unity's "Application.targetFrameRate" helps, but consider implementing Adaptive Performance for Samsung and Google devices. On iOS, Metal's presentation is generally smooth out of the box.
Closing Thoughts
Performance isn't a feature you add at the end — it's a continuous practice. The best-performing games make optimization invisible to the player. They just feel smooth and responsive, no matter the device.
Enjoyed this article?
Browse more posts or reach out to discuss your project.