docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MeshImporter

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

    Inheritance
    object
    MeshImporter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.ProBuilder.MeshOperations
    Assembly: Unity.ProBuilder.dll
    Syntax
    public sealed class MeshImporter

    Constructors

    MeshImporter(GameObject)

    Creates a new ProBuilderMesh importer instance from the specified GameObject.

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

    The GameObject to write vertex data to.

    MeshImporter(Mesh, Material[], ProBuilderMesh)

    Creates a new ProBuilderMesh importer instance from the specified mesh and materials.

    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.

    Methods

    Import(MeshImportSettings)

    Imports mesh data from a GameObject's sharedMesh and sharedMaterials properties.

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

    Optional import customization settings.

    Exceptions
    Type Condition
    NotSupportedException

    Import only supports triangle and quad mesh topologies.

    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)