The shaders in the Universal Render Pipeline (URP) use shader keywords to support many different features, which might mean Unity compiles a lot of shader variantsA verion of a shader program that Unity generates according to a specific combination of shader keywords and their status. A Shader object can contain multiple shader variants. More info
See in Glossary.
The following resources are about speeding up builds by reducing the number of shader variants URP compiles.
For more information, refer to Reduce shader variants, which applies to all render pipelines.
| Page | Description |
|---|---|
| Check how many shader variants your build has | Log how many shader variants Unity compiles and strips. |
| Strip shader variants | Remove shader variants for features you don’t use. |
| Enable dynamic branching in shaders | Make Unity use dynamic branching in prebuilt or custom shaders, instead of keywords and shader variants. |
| Settings and keywords reference for shader stripping | Explore the settings and shader keywords you can use to strip shader variants. |