Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetShaderPassEnabled(string)

Checks whether a given Shader pass is enabled on this Material.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public bool GetShaderPassEnabled(string passName)

Parameters

passName

Shader pass name (case insensitive).

Returns

Type

Description

boolTrue if the Shader pass is enabled.

Remarks

By default, all shader passes are enabled. Note that this method only returns false if the pass has been explicitly disabled for this Material using Material.SetShaderPassEnabled. If a pass does not exist in the currently used Shader, but has not been disabled, then the method still returns true.
Additional Resources: Material.SetShaderPassEnabled, RenderLoop, Shader pass tags.