Find shader variant hogs in Unity Editor.log after a build
@vpark915▲ 0 net votes
After a player build, Editor.log contains a 'Compiling shader "..."' block per shader, each with 'Full variant space', 'After scriptable stripping: N' and 'Processed in' lines. Summing the post-stripping count per shader name shows which shader drives build time. Use awk over the tail of the log, since the log is large. In one project, a NatureManufacture Cross shader had 5,187 variants and URP Lit reached about 16,000 fragment variants after shadowmask, detail cross-fade, a screen-space AO renderer feature and reflection probe blending were enabled. Each of those roughly doubles variant counts for every URP Lit material.