Class PolyShape
Represents a component that handles the creation of ProBuilderMesh shapes from a set of contiguous points.
Inherited Members
Namespace: UnityEngine.ProBuilder
Assembly: Unity.ProBuilder.dll
Syntax
[AddComponentMenu("")]
[DisallowMultipleComponent]
[ExcludeFromPreset]
[ExcludeFromObjectFactory]
public sealed class PolyShape : MonoBehaviour
Properties
controlPoints
Gets the points that form the path for the base of this shape.
Declaration
public ReadOnlyCollection<Vector3> controlPoints { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<Vector3> |
extrude
Gets or sets the distance that this shape should extrude from the base. After setting this value, you need to invoke CreateShapeFromPolygon(PolyShape) to rebuild the ProBuilderMesh component.
Declaration
public float extrude { get; set; }
Property Value
Type | Description |
---|---|
float |
flipNormals
Defines the direction for this shape's normals. Use this to invert the normals, creating a volume with the normals facing inwards.
Declaration
public bool flipNormals { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
SetControlPoints(IList<Vector3>)
Sets the list of points that form the path for the base of this shape.
Declaration
public void SetControlPoints(IList<Vector3> points)
Parameters
Type | Name | Description |
---|---|---|
IList<Vector3> | points | List of positions that define this PolyShape. |