docs.unity3d.com
    Show / Hide Table of Contents

    Class ExtrudeElements

    Contains functions to help with face and edge extrusion.

    Inheritance
    Object
    ExtrudeElements
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.ProBuilder.MeshOperations
    Syntax
    public static class ExtrudeElements

    Methods

    DetachFaces(ProBuilderMesh, IEnumerable<Face>)

    Splits any shared vertices so that this face may be moved independently of the GameObject.

    This is the equivalent of the Detach Faces action.

    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)

    Splits any shared vertices so that this face may be moved independently of the GameObject and optionally deletes the faces on the source geometry.

    This is the equivalent of the Detach Faces action.

    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

    True to delete the faces on the source geometry where the faces were detached; false to keep them.

    Returns
    Type Description
    List<Face>

    The faces created forming the detached face group.

    Extrude(ProBuilderMesh, IEnumerable<Edge>, Single, Boolean, Boolean)

    Extrudes a collection of edges.

    This is the equivalent of the Extrude Edges action.

    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

    True to keep any shared vertices when extruding adjacent edges; false to split the shared vertex.

    Boolean enableManifoldExtrude

    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)

    Extrudes a collection of faces.

    This is the equivalent of the Extrude Faces action.

    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 to extrude the faces (separately or as a group, either from averaged or individual normals).

    Single distance

    The distance to extrude faces.

    Returns
    Type Description
    Face[]

    An array of the faces created as a result of the extrusion or null if faces is null or empty.

    Back to top
    Terms of use
    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