기술 자료

Unity Engine


User Manual

Script Reference

Unity Engine


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 hasLog how many shader variants Unity compiles and strips.
Strip shader variantsRemove shader variants for features you don't use.
Enable dynamic branching in shadersMake Unity use dynamic branching in prebuilt or custom shaders, instead of keywords and shader variants.
Settings and keywords reference for shader strippingExplore the settings and shader keywords you can use to strip shader variants.

Additional resources