unity-performance
Installation
SKILL.md
Unity performance
Start with the general loop in game-performance (budget, baseline, one change, measure again). This skill
is the Unity part.
Measure the build, not the editor
The editor adds its own cost (the Scene view, the Inspector, editor-only checks), so a game at 10 fps in the editor can be fine in a build. Measure a Development Build with Autoconnect Profiler on:
- Profiler, CPU module: Timeline view for one slow frame, Hierarchy sorted by self time to find the function.
Watch GC.Alloc per frame: anything above zero in steady gameplay is garbage you'll pay for later.
Deep Profile adds a lot of overhead; use it briefly, or add
ProfilerMarkers around your own code. - Rendering module and the Frame Debugger: batches, SetPass calls and what each draw is.
- Memory Profiler package: take a snapshot before and after a level change and compare.
- Profile Analyzer package: compare two captures (before and after your fix) frame by frame.
Report p50, p95, p99 and the worst frame in ms, not average fps.