Class Stairs
Represents a basic stairs shape.
Inherited Members
Namespace: UnityEngine.ProBuilder.Shapes
Syntax
[Shape("Stairs")]
public class Stairs : Shape
Properties
sides
Gets or sets whether to draw polygons on the sides of the stairs.
Declaration
public bool sides { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
CopyShape(Shape)
Overwrites this shape's property values by copying them from the specified Shape object.
Declaration
public override void CopyShape(Shape shape)
Parameters
Type | Name | Description |
---|---|---|
Shape | shape | The Shape to copy property values from. |
Overrides
RebuildMesh(ProBuilderMesh, Vector3, Quaternion)
Rebuilds the specified mesh using the existing property values for this shape. This includes building a list of vertices and normals for each face, applying smoothing to the faces if required, and calculating the bounds of the mesh.
Declaration
public override Bounds RebuildMesh(ProBuilderMesh mesh, Vector3 size, Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The mesh to rebuild. |
Vector3 | size | The position of the opposite corner of the bounding box for this shape. |
Quaternion | rotation | The rotation (orientation) to use for this mesh. |
Returns
Type | Description |
---|---|
Bounds | The bounds calculated for this shape after rebuilding it. |
Overrides
UpdateBounds(ProBuilderMesh, Vector3, Quaternion, Bounds)
Allows the user to redefine the default bounding box for this shape.
Declaration
public override Bounds UpdateBounds(ProBuilderMesh mesh, Vector3 size, Quaternion rotation, Bounds bounds)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The mesh to find the bounds for. |
Vector3 | size | The desired size for the shape defined when using the Shape Tool. |
Quaternion | rotation | The rotation (orientation) to use for this mesh. |
Bounds | bounds | The default bounds computed for the shape. |
Returns
Type | Description |
---|---|
Bounds | The bounds from this shape's bounds property. |