docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ExtrudeElements

    Contains functions to help with face and edge extrusion.

    Inheritance
    object
    ExtrudeElements
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.ProBuilder.MeshOperations
    Assembly: Unity.ProBuilder.dll
    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>, bool)

    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.

    bool 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>, float, bool, bool)

    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.

    float distance

    The distance to extrude.

    bool extrudeAsGroup

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

    bool 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, float)

    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).

    float 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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)