Reducing shader variants in URP
Check how many shader variants your build has, and disable features to strip shader variants.
읽는 시간 1분최근 업데이트: 한 달 전
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 variants.
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. |