docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)