CanvasElementMesh Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.MaskableGraphicCanvasElementMesh
- 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. |