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
Shader pass name (case insensitive).
Returns
Type | Description |
|---|---|
| bool | True 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.