Method GenerateTorus
GenerateTorus(PivotLocation, int, int, float, float, bool, float, float, bool)
Creates a new torus mesh.
Declaration
public static ProBuilderMesh GenerateTorus(PivotLocation pivotType, int rows, int columns, float innerRadius, float outerRadius, bool smooth, float horizontalCircumference, float verticalCircumference, bool manualUvs = false)
Parameters
Type | Name | Description |
---|---|---|
PivotLocation | pivotType | Set the location of the shape's pivot (center or first corner). |
int | rows | Set the number of horizontal divisions to create. |
int | columns | Set the number of vertical divisions to create. |
float | innerRadius | Set the distance from the center to the inner bounds of this shape. |
float | outerRadius | Set the distance from the center to the outer bounds of this shape. |
bool | smooth | Set to true to mark all faces as one smoothing group; false for no smoothing groups. |
float | horizontalCircumference | Set the horizontal circumference in degrees. |
float | verticalCircumference | Set the vertical circumference in degrees. |
bool | manualUvs | By default, this value is false, and ProBuilder uses automatic UV wrapping for textures. To achieve better results, set this value to true to use manual UV unwrapping for textures instead. |
Returns
Type | Description |
---|---|
ProBuilderMesh | A new GameObject with a reference to the ProBuilderMesh component. |