Class StencilMaterial
Dynamic material class makes it possible to create custom materials on the fly on a per-Graphic basis,
and still have them get cleaned up correctly.
Inheritance
StencilMaterial
Assembly: UnityEngine.UI.dll
Syntax
public static class StencilMaterial
Methods
Add(Material, int, StencilOp, CompareFunction, ColorWriteMask)
Add a new material using the specified base and stencil ID.
Declaration
public static Material Add(Material baseMat, int stencilID, StencilOp operation, CompareFunction compareFunction, ColorWriteMask colorWriteMask)
Parameters
Returns
Add(Material, int, StencilOp, CompareFunction, ColorWriteMask, int, int)
Add a new material using the specified base and stencil ID.
Declaration
public static Material Add(Material baseMat, int stencilID, StencilOp operation, CompareFunction compareFunction, ColorWriteMask colorWriteMask, int readMask, int writeMask)
Parameters
Returns
ClearAll()
Declaration
public static void ClearAll()
Remove(Material)
Remove an existing material, automatically cleaning it up if it's no longer in use.
Declaration
public static void Remove(Material customMat)
Parameters
Type |
Name |
Description |
Material |
customMat |
|