CanvasElementMesh Class

Definition

Allows a 3D mesh to be rendered within a UnityUI canvas.

[UnityEngine.RequireComponent(typeof(UnityEngine.CanvasRenderer))]
public class CanvasElementMesh : UnityEngine.UI.MaskableGraphic
[<UnityEngine.RequireComponent(typeof(UnityEngine.CanvasRenderer))>]
type CanvasElementMesh = class
    inherit MaskableGraphic
Public Class CanvasElementMesh
Inherits MaskableGraphic
Inheritance
UnityEngine.UI.MaskableGraphic
CanvasElementMesh
Attributes
UnityEngine.RequireComponentAttribute

Constructors

CanvasElementMesh()

Properties

Mesh

The source mesh to use for populating the Graphic with vertex information.

PreserveAspect

Whether this element should preserve its source mesh aspect ratio (scale).

Texture

The main texture to use on the material.

ZPivot

The normalized z-pivot that this mesh rotates around. (compare to RectTransform.pivot)

Methods

OnPopulateMesh(VertexHelper)

Callback function when a UI element needs to generate vertices.

OnValidate()

Enforces the parent canvas uses normal and tangent attributes.

Start()

Enforces the parent canvas uses normal and tangent attributes.

UpdateMaterial()

Called to update the Material of the graphic onto the CanvasRenderer.

Applies to