TriLib Exporter
Search Results for

    Show / Hide Table of Contents

    Class AssetWriter

    Provides functionality to export Unity assets to external files or streams.

    Inheritance
    object
    AssetWriter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: TriLibExporter
    Assembly: Assembly-CSharp.dll
    Syntax
    public static class AssetWriter

    Methods

    ExportToFile(GameObject, string, AssetWriterOptions, Action<AssetWriterContext>, Action<IContextualizedError>)

    Exports a Unity UnityEngine.GameObject to a file on the specified path.

    Declaration
    public static void ExportToFile(GameObject sourceGameObject, string path, AssetWriterOptions options = null, Action<AssetWriterContext> onComplete = null, Action<IContextualizedError> onError = null)
    Parameters
    Type Name Description
    GameObject sourceGameObject

    The source UnityEngine.GameObject to export.

    string path

    The target file path where the UnityEngine.GameObject will be exported.

    AssetWriterOptions options

    Optional parameters for customizing the export process.

    Action<AssetWriterContext> onComplete

    An optional callback to be invoked upon successful export.

    Action<IContextualizedError> onError

    An optional callback to be invoked if an error occurs during the export process.

    ExportToStream(GameObject, Stream, string, AssetWriterOptions, Action<AssetWriterContext>, Action<IContextualizedError>, string)

    Exports a Unity UnityEngine.GameObject to a provided TriLibExporter.Stream.

    Declaration
    public static void ExportToStream(GameObject sourceGameObject, Stream stream, string fileExtension, AssetWriterOptions options = null, Action<AssetWriterContext> onComplete = null, Action<IContextualizedError> onError = null, string customPath = null)
    Parameters
    Type Name Description
    GameObject sourceGameObject

    The source UnityEngine.GameObject to export.

    Stream stream

    The output TriLibExporter.Stream where the asset will be written.

    string fileExtension

    The file extension that determines the export format.

    AssetWriterOptions options

    Optional parameters for customizing the export process.

    Action<AssetWriterContext> onComplete

    An optional callback to be invoked upon successful export.

    Action<IContextualizedError> onError

    An optional callback to be invoked if an error occurs during the export process.

    string customPath

    Optional file path associated with the stream, used for context during export.

    In this article
    Back to top Generated by DocFX