Documentation

Unity Engine

Download Unity

Unity Engine

SetCustomShader(BuiltinShaderType, Shader)

Set custom shader to use instead of a built-in shader.
Read time 1 minuteLast updated 6 days ago

Definition

Warning
Deprecated. GraphicsSettings.SetCustomShader is deprecated and will be removed in a future release. It's used only by the Built-In Render Pipeline, which is no longer supported. The Universal Render Pipeline (URP) doesn't use built-in shader settings.
public static void SetCustomShader(BuiltinShaderType type, Shader shader)

Parameters

Built-in shader type to set custom shader to.

shader

The shader to use.

Remarks

Important: This API is compatible only with the Built-In Render Pipeline, which is no longer supported. For more information on migrating to URP, refer to Migrating from the Built-In Render Pipeline to URP.
This is only used when built-in shader is set to BuiltinShaderMode.UseCustom mode; see GraphicsSettings.SetShaderMode.