Version: Unity 6.7 Alpha (6000.7)
Language : English
Web setting configurations
Recommended Player settings to optimize your Web build

Recommended Graphics settings to optimize your Web build

Use the following recommended Graphics settings to optimize your builds for the Unity Web platform.

Graphics settings

Unused shadersA program that runs on the GPU. More info
See in Glossary
can increase build times, file size, and memory usage. In most projects, use the Recommended option for most projects for each setting to strip your build of unused shaders and resources.

To reduce your build size further, use the Recommended option for the smallest build. Use these settings only if your project doesn’t use the related feature, because they strip the shader variants and resources that the feature needs.

Find these settings under Edit > Project Settings > Graphics. For more information on each setting, refer to the details in Graphics.

Setting Recommended option for most projects Recommended option for the smallest build
Lightmap Modes Automatic Custom, then deselect all the checkboxes
Fog Modes Automatic Custom, then deselect all the checkboxes
Instancing Variants Strip Unused Strip All
Batch Renderer Group Variants Strip if Entities Graphics Package is not installed Strip All
Video Include if referenced Don’t Include
Always Included Shaders Remove unused shaders. You can also edit this list using C#. Empty the list

For more ways to reduce build size, such as removing unused packages and built-in modules, refer to Remove unused resources from your Web build.

Edit the Always Included Shaders list via C

To change the Always Included Shaders list with a script, create a list of shaders you want in the list and assign it like this:

GraphicsSettings.alwaysIncludedShaders = newShadersList.ToArray();

URP-specific settings

If your project uses the Universal Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary
(URP), use the following recommended settings to reduce the size of your Web build. Find these settings in the Graphics settings, URP assets, and Universal Renderer assets.

URP includes resources in your build based on the features you enable. Disable or strip a feature only if your project doesn’t use it, otherwise your build might not have the resources it needs. Check the settings in every URP asset your build uses, and in every Universal Renderer asset that those URP assets reference.

Graphics settings for URP

In Edit > Project Settings > Graphics, configure the following settings.

Setting Recommended option
Additional Shader Stripping Settings > Strip Runtime Debug Shaders Enabled
Additional Shader Stripping Settings > Strip Unused Post Processing Variants And Resources Enabled
Additional Shader Stripping Settings > Strip Unused Variants Enabled
Additional Shader Stripping Settings > Strip Screen Coord Override Variants Enabled
Terrain Shader Inclusion Settings > Include Terrain Shaders Disabled

When you strip shader variants, Unity might remove variants that your built project needs. Test your build to make sure it renders correctly. To check how many shader variants your project has, refer to Check how many shader variants you have. For more information, refer to Strip shader variants in URP.

URP asset options

In each URP asset your build uses, configure the following setting.

Setting Recommended option
GPU Resident Drawer Disabled. For more information, refer to GPU Resident Drawer.

Universal Renderer asset options

In each Universal Renderer asset that your URP assets reference, configure the following settings.

Setting Recommended option
Post-processingA process that improves product visuals by applying filters and effects before the image appears on screen. You can use post-processing effects to simulate physical camera and film properties, for example Bloom and Depth of Field. More info post processing, postprocessing, postprocess
See in Glossary
Disabled. For more information, refer to Post-processing in URP.
Renderer Features Keep only the ones you use. For more information, refer to Renderer Features in URP.

Additional resources

Web setting configurations
Recommended Player settings to optimize your Web build