Method GenerateIcosahedron
GenerateIcosahedron(PivotLocation, float, int, bool, bool)
Creates a new icosphere shape.
Declaration
public static ProBuilderMesh GenerateIcosahedron(PivotLocation pivotType, float radius, int subdivisions, bool weldVertices = true, bool manualUvs = true)
Parameters
Type | Name | Description |
---|---|---|
PivotLocation | pivotType | Set the location of the shape's pivot (center or first corner). |
float | radius | Set the radius of the sphere. |
int | subdivisions | Set the number of subdivisions to perform. |
bool | weldVertices | By default, this value is true, meaning that it extracts shared indexes. Set this to false to show a preview, where speed of generation is more important than making the shape editable. |
bool | manualUvs | By default, this value is true, meaning that faces on icospheres are marked as manual UVs for performance reasons. Set this to false if you want ProBuilder to use auto-unwrapped UVs. |
Returns
Type | Description |
---|---|
ProBuilderMesh | A new GameObject with a reference to the ProBuilderMesh component. |