Class ExtrudeElements
Face and edge extrusion.
Inheritance
Namespace: UnityEngine.ProBuilder.MeshOperations
Syntax
public static class ExtrudeElements
Methods
DetachFaces(ProBuilderMesh, IEnumerable<Face>)
Split any shared vertices so that this face may be moved independently of the main object.
Declaration
public static List<Face> DetachFaces(this ProBuilderMesh mesh, IEnumerable<Face> faces)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The source mesh. |
System.Collections.Generic.IEnumerable<Face> | faces | The faces to split from the mesh. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Face> | The faces created forming the detached face group. |
Extrude(ProBuilderMesh, IEnumerable<Edge>, Single, Boolean, Boolean)
Extrude a collection of edges.
Declaration
public static Edge[] Extrude(this ProBuilderMesh mesh, IEnumerable<Edge> edges, float distance, bool extrudeAsGroup, bool enableManifoldExtrude)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The source mesh. |
System.Collections.Generic.IEnumerable<Edge> | edges | The edges to extrude. |
System.Single | distance | The distance to extrude. |
System.Boolean | extrudeAsGroup | If true adjacent edges will be extruded retaining a shared vertex, if false the shared vertex will be split. |
System.Boolean | enableManifoldExtrude | Pass true to allow this function to extrude manifold edges, false to disallow. |
Returns
Type | Description |
---|---|
Edge[] | The extruded edges, or null if the action failed due to manifold check or an empty edges parameter. |
Extrude(ProBuilderMesh, IEnumerable<Face>, ExtrudeMethod, Single)
Extrude a collection of faces.
Declaration
public static Face[] Extrude(this ProBuilderMesh mesh, IEnumerable<Face> faces, ExtrudeMethod method, float distance)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The source mesh. |
System.Collections.Generic.IEnumerable<Face> | faces | The faces to extrude. |
ExtrudeMethod | method | Describes how faces are extruded. |
System.Single | distance | The distance to extrude faces. |
Returns
Type | Description |
---|---|
Face[] | An array of the faces created as a result of the extrusion. Null if the faces paramater is null or empty. |