docs.unity3d.com
    Show / Hide Table of Contents

    Class MergeElements

    Methods for merging multiple faces of a ProBuilderMesh to a single face.

    Inheritance
    Object
    MergeElements
    Namespace: UnityEngine.ProBuilder.MeshOperations
    Syntax
    public static class MergeElements

    Methods

    Merge(ProBuilderMesh, IEnumerable<Face>)

    Merge a collection of faces to a single face. This function does not perform any sanity checks, it just merges faces. It's the caller's responsibility to make sure that the input is valid. In addition to merging faces this method also removes duplicate vertices created as a result of merging previously common vertices.

    Declaration
    public static Face Merge(ProBuilderMesh target, IEnumerable<Face> faces)
    Parameters
    Type Name Description
    ProBuilderMesh target
    IEnumerable<Face> faces
    Returns
    Type Description
    Face

    MergePairs(ProBuilderMesh, IEnumerable<SimpleTuple<Face, Face>>, Boolean)

    Merge each pair of faces to a single face. Indexes are combined, but otherwise the properties of the first face in the pair take precedence. Returns a list of the new faces created.

    Declaration
    public static List<Face> MergePairs(ProBuilderMesh target, IEnumerable<SimpleTuple<Face, Face>> pairs, bool collapseCoincidentVertices = true)
    Parameters
    Type Name Description
    ProBuilderMesh target
    IEnumerable<SimpleTuple<Face, Face>> pairs
    Boolean collapseCoincidentVertices
    Returns
    Type Description
    List<Face>
    Back to top
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)