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).
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. |