日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class UIMaterialInstantiator

    This is required since UnityUI Graphic elements do not support MaterialPropertyBlocks, and any shader operations can end up modifying the material permanently across all shared instances. To prevent that we create a runtime copy of the material.

    Inheritance
    Object
    UIMaterialInstantiator
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.UI
    Assembly: cs.temp.dll.dll
    Syntax
    public class UIMaterialInstantiator

    Methods

    TryCreateMaterialCopy(Graphic)

    Invoke this method to create a copy of the material and use that copy at runtime for Graphic objects to prevent modifying materials in editor or impact shared materials.

    Declaration
    public static void TryCreateMaterialCopy(Graphic targetGraphic)
    Parameters
    Type Name Description
    Graphic targetGraphic

    Graphic element that needs to clone its material

    Back to top Generated by DocFX