Method GenerateCube
GenerateCube(PivotLocation, Vector3)
Creates a new cube with the specified size as a bounding box. The size is fixed: it is not applied as a scale value in the transform.
Declaration
public static ProBuilderMesh GenerateCube(PivotLocation pivotType, Vector3 size)
Parameters
Type | Name | Description |
---|---|---|
PivotLocation | pivotType | Set the location of the shape's pivot (center or first corner). |
Vector3 | size | Set the position of the opposite corner of the bounding box for the cube. |
Returns
Type | Description |
---|---|
ProBuilderMesh | A new GameObject with a reference to the ProBuilderMesh component. |