UNITY PROFILER GUIDE FOR BEGINNERS: FINDING BOTTLENECKS
Learn how to connect the Unity Profiler to physical devices via ADB, diagnose CPU vs GPU bound limits, eliminate GC allocations, and fix frame rate hitching.
1. Connecting the Profiler to an Android Device
Never profile inside the Unity Editor alone: the Editor overhead, scene view rendering, and debug symbols produce inaccurate timings. Always profile on a physical target device:
- In Unity, go to File > Build Settings.
- Check Development Build and Autoconnect Profiler.
- Connect your Android phone via USB and ensure USB Debugging is enabled in Developer Options.
- Click Build And Run.
- Open the Profiler window in Unity (Ctrl + 7 or Cmd + 7). Unity will automatically stream real-time telemetry from your device over ADB.
2. Is Your Game CPU-Bound or GPU-Bound?
Profiler Markers: High
Update() times, Physics.Simulate spikes, heavy GC.Alloc garbage pauses, or excessive draw call driver overhead.
Causes: High screen resolution overdraw, heavy fragment/pixel shaders, uncompressed textures, or excessive real-time shadows.
3. Hunting Garbage Allocations (GC.Alloc)
In the CPU Usage module, switch the display from Timeline to Hierarchy and click the GC Alloc column header to sort by memory consumption.
Any script allocating even 20 to 50 bytes per frame inside Update() is a primary candidate for optimization (e.g. converting string concatenations to cached strings, replacing LINQ with for-loops, or pooling GameObjects).
Related Mobile Optimization Guides & Tools
Frequently Asked Questions
WaitForTargetFPS indicates that your CPU finished all its work ahead of the targeted frame time (e.g. 16.6ms for 60 FPS) and is simply sleeping until the next VSync interval. This is a healthy sign that your game is running smoothly with CPU headroom to spare.