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

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

    Show / Hide Table of Contents

    Class ScaleMeshEffect

    On Unity UI components the unity_ObjectToWorld matrix is not the transformation matrix of the local transform the Graphic component lives on, but that of its parent Canvas. Many MRTK/Standard shader effects require object scale to be known. To solve this issue the ScaleMeshEffect will store scaling information into UV channel attributes during UI mesh construction. Ideally we would store the scale in one attribute but UGUI only supports two scalers per attribute (even in the tangent attribute).

    Inheritance
    Object
    ScaleMeshEffect
    Namespace: Microsoft.MixedReality.Toolkit.Input.Utilities
    Assembly: cs.temp.dll.dll
    Syntax
    public class ScaleMeshEffect : BaseMeshEffect

    Methods

    Awake()

    Enforces the parent canvas uses UV channel attributes.

    Declaration
    protected override void Awake()

    ModifyMesh(VertexHelper)

    Stores scaling information into UV channel attributes during UI mesh construction.

    Declaration
    public override void ModifyMesh(VertexHelper vh)
    Parameters
    Type Name Description
    VertexHelper vh

    The vertex helper to populate with new vertex data.

    Back to top Generated by DocFX