docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Class MaterialUtils

    Runtime Material utilities.

    Inheritance
    object
    MaterialUtils
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils
    Assembly: solution.dll
    Syntax
    public static class MaterialUtils

    Methods

    Name Description
    AddMaterial(Renderer, Material)

    Adds a material to this renderer's array of shared materials.

    CloneMaterials(Renderer)

    Clones and replaces all materials assigned to a Renderer

    GetMaterialClone(Renderer)

    Clones and replaces the material assigned to a Renderer.

    GetMaterialClone(Graphic)

    Clones and replaces the material assigned to a Graphic.

    HexToColor(string)

    Converts an RGB or RGBA formatted hex string to a Color object.

    HueShift(Color, float)

    Shift the hue of a color by a given amount.

    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)