docs.unity3d.com
    Show / Hide Table of Contents

    Class MeshImporter

    Responsible for importing UnityEngine.Mesh data to a ProBuilderMesh component.

    Inheritance
    Object
    MeshImporter
    Namespace: UnityEngine.ProBuilder.MeshOperations
    Syntax
    public sealed class MeshImporter

    Constructors

    MeshImporter(GameObject)

    Declaration
    public MeshImporter(GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject

    MeshImporter(Mesh, Material[], ProBuilderMesh)

    Create a new ProBuilderMesh importer instance.

    Declaration
    public MeshImporter(Mesh sourceMesh, Material[] sourceMaterials, ProBuilderMesh destination)
    Parameters
    Type Name Description
    Mesh sourceMesh

    The Mesh asset to import vertex data from.

    Material[] sourceMaterials

    The materials to assign to the ProBuilderMesh renderer.

    ProBuilderMesh destination

    The ProBuilderMesh asset to write vertex data to.

    MeshImporter(ProBuilderMesh)

    Declaration
    [Obsolete]
    public MeshImporter(ProBuilderMesh destination)
    Parameters
    Type Name Description
    ProBuilderMesh destination

    Methods

    Import(GameObject, MeshImportSettings)

    Declaration
    [Obsolete]
    public bool Import(GameObject go, MeshImportSettings importSettings = null)
    Parameters
    Type Name Description
    GameObject go
    MeshImportSettings importSettings
    Returns
    Type Description
    Boolean

    Import(MeshImportSettings)

    Import mesh data from a GameObject's MeshFilter.sharedMesh and MeshRenderer.sharedMaterials.

    Declaration
    public void Import(MeshImportSettings importSettings = null)
    Parameters
    Type Name Description
    MeshImportSettings importSettings

    Optional settings parameter defines import customization properties.

    Exceptions
    Type Condition
    NotSupportedException

    Import only supports triangle and quad mesh topologies.

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