ドキュメント

Unity Engine

Unity Engine

GetShaderPassEnabled(string)

Checks whether a given Shader pass is enabled on this Material.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

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.