CanvasElementRoundedRect 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.
Procedurally generates a 3D rounded rect mesh to be rendered within a UnityUI canvas.
[UnityEngine.RequireComponent(typeof(UnityEngine.CanvasRenderer))]
public class CanvasElementRoundedRect : UnityEngine.UI.MaskableGraphic
[<UnityEngine.RequireComponent(typeof(UnityEngine.CanvasRenderer))>]
type CanvasElementRoundedRect = class
inherit MaskableGraphic
Public Class CanvasElementRoundedRect
Inherits MaskableGraphic
- Inheritance
-
UnityEngine.UI.MaskableGraphicCanvasElementRoundedRect
- Attributes
-
UnityEngine.RequireComponentAttribute
Constructors
CanvasElementRoundedRect() |
Properties
Radius |
Specifies the corner radius in world units. Should be less than half the width or height. |
SmoothEdges | |
Thickness |
Controls the depth of the rounded rect along the local z axis. |
Wedges |
Controls how many subdivisions at the corners of the rounded rect. More wedges produces smoother corners at the expense of more triangles. |
Methods
OnPopulateMesh(VertexHelper) |
When the mesh changes, rebuilds the vertices. |
OnRectTransformDimensionsChange() |
Marks the vertices dirty when the rect changes. |
OnTransformParentChanged() |
Marks the vertices dirty when the parent changes. |
Start() |
Ensures the canvas generates required vertex attributes. |