Interface IMaterialModifier
Use this interface to modify a Material that renders a Graphic. The Material is modified before the it is passed to the CanvasRenderer.
Namespace: UnityEngine.UI
Assembly: UnityEngine.UI.dll
Syntax
public interface IMaterialModifier
Remarks
When a Graphic sets a material that is passed (in order) to any components on the GameObject that implement IMaterialModifier. This component can modify the material to be used for rendering.
Methods
GetModifiedMaterial(Material)
Perform material modification in this function.
Declaration
Material GetModifiedMaterial(Material baseMaterial)
Parameters
Type | Name | Description |
---|---|---|
Material | baseMaterial | The material that is to be modified |
Returns
Type | Description |
---|---|
Material | The modified material. |