Class ShapeFactory
Namespace: UnityEngine.ProBuilder
Syntax
public static class ShapeFactory
Methods
Instantiate(Type, PivotLocation)
Create a shape with default parameters.
Declaration
public static ProBuilderMesh Instantiate(Type shapeType, PivotLocation pivotType = PivotLocation.Center)
Parameters
Type | Name | Description |
---|---|---|
Type | shapeType | The ShapeType to create. |
PivotLocation | pivotType | Where the shape's pivot will be. |
Returns
Type | Description |
---|---|
ProBuilderMesh | A new GameObject with the ProBuilderMesh initialized to the primitive shape. |
Instantiate(Shape, PivotLocation)
Create a shape with default parameters.
Declaration
public static ProBuilderMesh Instantiate(Shape shape, PivotLocation pivotType = PivotLocation.Center)
Parameters
Type | Name | Description |
---|---|---|
Shape | shape | The ShapeType to create. |
PivotLocation | pivotType | Where the shape's pivot will be. |
Returns
Type | Description |
---|---|
ProBuilderMesh | A new GameObject with the ProBuilderMesh initialized to the primitive shape. |
Instantiate<T>(PivotLocation)
Create a shape with default parameters.
Declaration
public static ProBuilderMesh Instantiate<T>(PivotLocation pivotType = PivotLocation.Center)
where T : Shape, new()
Parameters
Type | Name | Description |
---|---|---|
PivotLocation | pivotType | Where the shape's pivot will be. |
Returns
Type | Description |
---|---|
ProBuilderMesh | A new GameObject with the ProBuilderMesh initialized to the primitive shape. |
Type Parameters
Name | Description |
---|---|
T |