docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ModelExporter

    Use the ModelExporter class to export Unity GameObjects to an FBX file.

    Use the ExportObject and ExportObjects methods. The default export options are used when exporting the objects to the FBX file.

    For information on using the ModelExporter class, see the Developer's Guide.

    Inheritance
    object
    ModelExporter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Formats.Fbx.Exporter
    Assembly: Unity.Formats.Fbx.Editor.dll
    Syntax
    public sealed class ModelExporter

    Methods

    ExportObject(string, Object)

    Exports a single Unity GameObject to an FBX file.

    Declaration
    public static string ExportObject(string filePath, Object singleObject)
    Parameters
    Type Name Description
    string filePath

    Absolute file path to use for the FBX file.

    Object singleObject

    The Unity GameObject to export.

    Returns
    Type Description
    string

    The FBX file path if successful; otherwise null.

    ExportObject(string, Object, ExportModelOptions)

    Exports a single Unity GameObject to an FBX file, with the specified export settings.

    Declaration
    public static string ExportObject(string filePath, Object singleObject, ExportModelOptions exportOptions = null)
    Parameters
    Type Name Description
    string filePath

    Absolute file path to use for the FBX file.

    Object singleObject

    The Unity GameObject to export.

    ExportModelOptions exportOptions

    The export options to use.

    Returns
    Type Description
    string

    The FBX file path if successful; otherwise null.

    ExportObjects(string, Object[])

    Exports an array of Unity GameObjects to an FBX file.

    Declaration
    public static string ExportObjects(string filePath, Object[] objects = null)
    Parameters
    Type Name Description
    string filePath

    Absolute file path to use for the FBX file.

    Object[] objects

    Array of Unity GameObjects to export.

    Returns
    Type Description
    string

    The FBX file path if successful; otherwise returns null.

    ExportObjects(string, Object[], ExportModelOptions)

    Exports an array of Unity GameObjects to an FBX file, with the specified export settings.

    Declaration
    public static string ExportObjects(string filePath, Object[] objects = null, ExportModelOptions exportOptions = null)
    Parameters
    Type Name Description
    string filePath

    Absolute file path to use for the FBX file.

    Object[] objects

    Array of Unity GameObjects to export.

    ExportModelOptions exportOptions

    The export options to use.

    Returns
    Type Description
    string

    The FBX file path if successful; otherwise null.

    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)