Method GenerateCylinder
GenerateCylinder(PivotLocation, int, float, float, int, int)
Creates a cylinder primitive.
Declaration
public static ProBuilderMesh GenerateCylinder(PivotLocation pivotType, int axisDivisions, float radius, float height, int heightCuts, int smoothing = -1)
Parameters
Type | Name | Description |
---|---|---|
PivotLocation | pivotType | Set the location of the shape's pivot (center or first corner). |
int | axisDivisions | Set the number of divisions to create on the vertical axis. The larger the value, the smoother the surface. |
float | radius | Set the radius in world units. |
float | height | Set the height of this object in world units. |
int | heightCuts | Set the amount of divisions to create on the horizontal axis. |
int | smoothing | Set the smoothing group ID (index). |
Returns
Type | Description |
---|---|
ProBuilderMesh | A new GameObject with a reference to the ProBuilderMesh component. |