docs.unity3d.com
    Show / Hide Table of Contents

    Class CombineMeshes

    Methods for merging multiple ProBuilderMesh objects to a single mesh.

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

    Methods

    Combine(IEnumerable<ProBuilderMesh>)

    Merge a collection of ProBuilderMesh objects to as few meshes as possible. This may result in more than one mesh due to a max vertex count limit of 65535.

    Declaration
    [Obsolete("Combine(IEnumerable<ProBuilderMesh> meshes) is deprecated. Plase use Combine(IEnumerable<ProBuilderMesh> meshes, ProBuilderMesh meshTarget).")]
    public static List<ProBuilderMesh> Combine(IEnumerable<ProBuilderMesh> meshes)
    Parameters
    Type Name Description
    IEnumerable<ProBuilderMesh> meshes

    A collection of meshes to be merged.

    Returns
    Type Description
    List<ProBuilderMesh>

    A list of merged meshes. In most cases this will be a single mesh. However it can be multiple in cases where the resulting vertex count exceeds the maximum allowable value.

    Combine(IEnumerable<ProBuilderMesh>, ProBuilderMesh)

    Merge a collection of ProBuilderMesh objects to as few meshes as possible. It will re-use the meshTarget object as the first destination for the first maxVertexCount -1 vertices. If the sum of vertices is above maxVertexCount - 1 it will generate new meshes unless there is a single mesh left in which case it will append it to the return list.

    Declaration
    public static List<ProBuilderMesh> Combine(IEnumerable<ProBuilderMesh> meshes, ProBuilderMesh meshTarget)
    Parameters
    Type Name Description
    IEnumerable<ProBuilderMesh> meshes

    A collection of meshes to be merged. Note: it is expected that meshes includes meshTarget.

    ProBuilderMesh meshTarget

    A mesh which will be used as the starting point for merging and which will be kept as reference/target.

    Returns
    Type Description
    List<ProBuilderMesh>

    A list of merged meshes. In most cases this will be a single mesh corresponding to meshTarget. However it can be multiple in cases where the resulting vertex count exceeds the maximum allowable value.

    Back to top
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)