mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    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 it's 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
    Implements
    BaseMeshEffect
    Namespace: Microsoft.MixedReality.Toolkit.Input.Utilities
    Assembly: cs.temp.dll.dll
    Syntax
    public class ScaleMeshEffect : BaseMeshEffect, BaseMeshEffect

    Methods

    Awake()

    Enforces the parent canvas uses UV channel attributes.

    Declaration
    protected override void Awake()

    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.

    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.

    Implements

    BaseMeshEffect
    In This Article
    • Methods
      • Awake()
      • Awake()
      • ModifyMesh(VertexHelper)
      • ModifyMesh(VertexHelper)
    • Implements
    Back to top Generated by DocFX