Class MeshImporter | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class MeshImporter

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

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

    Constructors

    MeshImporter(ProBuilderMesh)

    Create a new MeshImporter instance.

    Declaration
    public MeshImporter(ProBuilderMesh target)
    Parameters
    Type Name Description
    ProBuilderMesh target

    The ProBuilderMesh component that will be initialized with the imported mesh attributes.

    Methods

    Import(Mesh, Material[], MeshImportSettings)

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

    Declaration
    public void Import(Mesh originalMesh, Material[] materials = null, MeshImportSettings importSettings = null)
    Parameters
    Type Name Description
    Mesh originalMesh

    The UnityEngine.Mesh to extract attributes from.

    Material[] materials

    The materials array corresponding to the originalMesh submeshes.

    MeshImportSettings importSettings

    Optional settings parameter defines import customization properties.

    Exceptions
    Type Condition
    System.NotSupportedException

    Import only supports triangle and quad mesh topologies.

    Back to top
    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