We've moved!

Starting from MRTK 2.6, we are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the MRTK-Unity section of the dot net API explorer. Existing content will remain here but will not be updated further.

Search Results for

    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.

    In This Article
    Back to top Generated by DocFX