Class ExtrudeElements | ProBuilder | 4.3.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class ExtrudeElements

    Face and edge extrusion.

    Inheritance
    Object
    ExtrudeElements
    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.

    IEnumerable<Face> faces

    The faces to split from the mesh.

    Returns
    Type Description
    List<Face>

    The faces created forming the detached face group.

    DetachFaces(ProBuilderMesh, IEnumerable<Face>, Boolean)

    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, bool deleteSourceFaces)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The source mesh.

    IEnumerable<Face> faces

    The faces to split from the mesh.

    Boolean deleteSourceFaces

    Whether or not to delete the faces on the source geometry which were detached.

    Returns
    Type Description
    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.

    IEnumerable<Edge> edges

    The edges to extrude.

    Single distance

    The distance to extrude.

    Boolean extrudeAsGroup

    If true adjacent edges will be extruded retaining a shared vertex, if false the shared vertex will be split.

    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.

    IEnumerable<Face> faces

    The faces to extrude.

    ExtrudeMethod method

    Describes how faces are extruded.

    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023