MAT004
GPU Instancing does nothing on renderers that are already static-batched
Static Batching wins. A MeshRenderer marked Batching Static is drawn from the build-time combined mesh, and the material’s Enable GPU Instancing flag is never consulted for it. So ticking that box across a whole project — the single most common blanket “optimization”, and one that AI assistants apply enthusiastically — does nothing at all on the static geometry that makes up most of a typical scene.
Under URP or HDRP it’s actively negative: the instancing flag also drops that material out of the SRP Batcher, which would have helped its non-static users.
What the scan looks at
Materials with GPU Instancing enabled that are used by Batching Static renderers in the currently loaded scene(s), reported once the overlap reaches a meaningful count (16 distinct static renderers) so small scenes don’t generate noise.
Two gates keep this honest:
- It only fires when Static Batching is actually enabled for the active build target. If it’s off, those renderers aren’t batched and instancing would apply — the premise doesn’t hold, so the rule stays silent.
- It only looks at loaded scenes. Scanning never opens or closes your scenes.
Why it matters
The failure mode isn’t a slowdown you can feel; it’s an optimization you believe you have. A project with instancing ticked everywhere reads as “instanced” in a review, while the draw-call profile is entirely static batches and SRP-Batcher-excluded materials. That’s a worse position than never having touched it, because now the box is ticked and nobody re-examines it.
We ran into this from the other direction while reviewing what Unity’s own AI Assistant does to a scene: it enabled GPU Instancing across the project and reported it as a win. The full breakdown of which of its 367 changes held up is here.
How to fix it by hand
- For materials used only by static geometry: untick Enable GPU Instancing. Static batching is already doing the work.
- For materials used by both static and dynamic copies: decide per material. Under an SRP, leaving instancing off usually wins, because the SRP Batcher handles the dynamic users well and doesn’t need the flag.
- Keep instancing where it earns its place: many dynamic, non-static-batched copies of the same mesh and material — foliage, projectiles, pooled objects, crowds.
What PerfLint does about it
Report-only by design, at Info. The same material may legitimately be instanced on non-static or runtime-spawned copies that a scene walk cannot see, so switching the flag off in bulk could regress exactly the cases instancing was for. The finding quantifies the overlap and names sample objects so you can review it, and refuses to make it a button.
The two neighbouring cases: MAT002 (instancing under an SRP at the material level) and MAT005 (instancing on materials only skinned meshes use, where it can never apply).
Check your own project. The scan is free, runs entirely on your machine, and reports this rule with the exact assets that trip it — nothing is uploaded.
Last reviewed · All rules