Method GeneratePlane
GeneratePlane(PivotLocation, float, float, int, int, Axis)
Creates a new plane shape.
Declaration
public static ProBuilderMesh GeneratePlane(PivotLocation pivotType, float width, float height, int widthCuts, int heightCuts, Axis axis)
Parameters
Type | Name | Description |
---|---|---|
PivotLocation | pivotType | Set the location of the shape's pivot (center or first corner). |
float | width | Set the width of the plane. |
float | height | Set the height of the plane. |
int | widthCuts | Set the divisions on the X-axis. |
int | heightCuts | Set the divisions on the Y-axis. |
Axis | axis | Set the axis to build the plane on. For example, |
Returns
Type | Description |
---|---|
ProBuilderMesh | A new GameObject with a reference to the ProBuilderMesh component. |