文档

Unity Engine

Unity Engine

IsPassCompiled(Material, int)

Checks if the Shader variant for the given pass in the Material has already been compiled.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public static bool IsPassCompiled(Material material, int pass)

Parameters

material

The Material to check against.

pass

The index of the Shader pass to check.

Returns

Type

Description

bool

Remarks

The Editor can compile Shaders asynchronously. You can use this method to check if the Editor has already compiled the particular Shader Variant needed for the specific pass of the Material.