Method GenerateStair
GenerateStair(PivotLocation, Vector3, int, bool)
Creates a set of straight stairs.
Declaration
public static ProBuilderMesh GenerateStair(PivotLocation pivotType, Vector3 size, int steps, bool buildSides)
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 stairs. |
int | steps | Set the number of steps to build. |
bool | buildSides | Set this to true to build the side and back walls or false to build only the stair top and connecting planes. |
Returns
Type | Description |
---|---|
ProBuilderMesh | A new GameObject with a reference to the ProBuilderMesh component. |