Vira Games · Action · 2023
300 units fighting on screen, on a tablet with 1 GB of RAM.


Frame rate read from an on-screen counter on the target device; drops traced with the Unity Profiler.
Pathfinding
The profiler pointed straight at NavMesh: every unit was pathfinding on its own, every frame.
I replaced per-unit logic with one shared update for the whole crowd, and let several units reuse a single path.
Pathfinding moved out of Update into a coroutine ticking roughly every 0.1 s, and a unit recalculated only after it reached its target instead of continuously.
Off-camera units lost animation, effects and mesh rendering, and units behind buildings were culled.
The last of it was solved in design rather than in code: enemies engage the player roughly one at a time, which keeps a brawl readable as well as cheap.
Memory
Before the frame rate mattered, the game did not launch on the target tablet at all. It asked for more memory than the device had.
I narrowed it down with an empty scene, loading the units alone, then the map alone, to find which half carried the weight.
The Memory Profiler put the answer somewhere I had not been looking: a single oversized texture that had come in with an art import was landing in the build.
Compressing it was the whole fix. The lesson was the method, not the texture — the cost was not in the code I had been reading.
I built this one end to end — gameplay, menus, progression, shop, skins, tutorial, ads and store builds. These are the parts worth naming.