TriLib Exporter
Search Results for

    Show / Hide Table of Contents

    Class AssetWriterContext

    Provides the context for exporting assets, including mappings, configurations, and runtime data.

    Inheritance
    object
    AssetWriterContext
    Implements
    IAssetWriterContext
    IAwaitable
    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 class AssetWriterContext : IAssetWriterContext, IAwaitable

    Fields

    AnimationBindingCount

    The total count of animation bindings processed during export.

    Declaration
    public int AnimationBindingCount
    Field Value
    Type Description
    int

    AnimationMapping

    A mapping of Unity animation clips to the export-specific animations.

    Declaration
    public Dictionary<AnimationClip, Animation> AnimationMapping
    Field Value
    Type Description
    Dictionary<AnimationClip, Animation>

    Async

    Indicates whether the export process is asynchronous.

    Declaration
    public bool Async
    Field Value
    Type Description
    bool

    BindPoses

    An array of bind poses used for exporting skinned meshes.

    Declaration
    public Matrix4x4[] BindPoses
    Field Value
    Type Description
    Matrix4x4[]

    BlendShapeCount

    The total count of blend shapes processed during export.

    Declaration
    public int BlendShapeCount
    Field Value
    Type Description
    int

    BlendShapeKeyCount

    The total count of blend shape keys processed during export.

    Declaration
    public int BlendShapeKeyCount
    Field Value
    Type Description
    int

    BonesCount

    The total count of bones processed during export.

    Declaration
    public int BonesCount
    Field Value
    Type Description
    int

    CancellationToken

    The cancellation token used for interrupting the export process.

    Declaration
    public CancellationToken CancellationToken
    Field Value
    Type Description
    CancellationToken

    FileDirectory

    The directory where the exported file is being saved.

    Declaration
    public string FileDirectory
    Field Value
    Type Description
    string

    FileExtension

    The file extension used for the exported asset.

    Declaration
    public string FileExtension
    Field Value
    Type Description
    string

    FilePath

    The full file path of the exported asset.

    Declaration
    public string FilePath
    Field Value
    Type Description
    string

    FileShortName

    The short file name where the exported file is being saved.

    Declaration
    public string FileShortName
    Field Value
    Type Description
    string

    GeometryGroupMapping

    A mapping of Unity meshes to geometry groups.

    Declaration
    public Dictionary<Mesh, GeometryGroup> GeometryGroupMapping
    Field Value
    Type Description
    Dictionary<Mesh, GeometryGroup>

    GeometryGroups

    A list of geometry groups processed during export.

    Declaration
    public List<GeometryGroup> GeometryGroups
    Field Value
    Type Description
    List<GeometryGroup>

    HandleError

    An action to handle errors during the export process.

    Declaration
    public Action<IContextualizedError> HandleError
    Field Value
    Type Description
    Action<IContextualizedError>

    MaterialGroups

    A list of material groups processed during export.

    Declaration
    public List<MaterialGroup> MaterialGroups
    Field Value
    Type Description
    List<MaterialGroup>

    MaterialMapping

    A mapping of Unity materials to export-specific materials.

    Declaration
    public Dictionary<Material, Material> MaterialMapping
    Field Value
    Type Description
    Dictionary<Material, Material>

    ModelMapping

    A mapping of Unity transforms to models.

    Declaration
    public Dictionary<Transform, Model> ModelMapping
    Field Value
    Type Description
    Dictionary<Transform, Model>

    ObjectsByName

    A dictionary of objects by their names for ensuring unique object names during export.

    Declaration
    public Dictionary<string, ObjectBase> ObjectsByName
    Field Value
    Type Description
    Dictionary<string, ObjectBase>

    OnComplete

    An action invoked when the export process completes successfully.

    Declaration
    public Action<AssetWriterContext> OnComplete
    Field Value
    Type Description
    Action<AssetWriterContext>

    OnError

    An action invoked when an error occurs during the export process.

    Declaration
    public Action<IContextualizedError> OnError
    Field Value
    Type Description
    Action<IContextualizedError>

    Options

    The options used to configure the export process.

    Declaration
    public AssetWriterOptions Options
    Field Value
    Type Description
    AssetWriterOptions

    RootGameObject

    The root Unity game object being exported.

    Declaration
    public GameObject RootGameObject
    Field Value
    Type Description
    GameObject

    RootModel

    The root model representation of the exported asset.

    Declaration
    public Model RootModel
    Field Value
    Type Description
    Model

    SceneAnimation

    The animation data for the exported scene.

    Declaration
    public Animation SceneAnimation
    Field Value
    Type Description
    Animation

    SkeletonCount

    The total count of skeletons processed during export.

    Declaration
    public int SkeletonCount
    Field Value
    Type Description
    int

    Stream

    The output stream used to write the exported asset.

    Declaration
    public Stream Stream
    Field Value
    Type Description
    Stream

    Tasks

    A list of tasks running during the export process.

    Declaration
    public List<Task> Tasks
    Field Value
    Type Description
    List<Task>

    TextureMapping

    A mapping of Unity textures to export-specific textures.

    Declaration
    public Dictionary<Texture, Texture> TextureMapping
    Field Value
    Type Description
    Dictionary<Texture, Texture>

    Writer

    The writer responsible for exporting the asset.

    Declaration
    public WriterBase Writer
    Field Value
    Type Description
    WriterBase

    Properties

    Completed

    Indicates whether the export process has completed.

    Declaration
    public bool Completed { get; set; }
    Property Value
    Type Description
    bool

    Context

    The context of the current export process.

    Declaration
    public AssetWriterContext Context { get; }
    Property Value
    Type Description
    AssetWriterContext

    Methods

    FinishLoading(AssetWriterContext)

    Finalizes the loading of all components during export.

    Declaration
    public static void FinishLoading(AssetWriterContext assetWriterContext)
    Parameters
    Type Name Description
    AssetWriterContext assetWriterContext

    The AssetWriterContext containing all loaded components to finalize.

    LoadAll(AssetWriterContext)

    Loads all necessary data for the export process by calling the individual load methods for models, geometry, materials, bones, and animations.

    Declaration
    public static void LoadAll(AssetWriterContext assetWriterContext)
    Parameters
    Type Name Description
    AssetWriterContext assetWriterContext

    The AssetWriterContext that will be populated with loaded data.

    LoadAnimations(AssetWriterContext)

    Loads animation data into the given context if ExportAnimations is enabled.

    Declaration
    public static void LoadAnimations(AssetWriterContext assetWriterContext)
    Parameters
    Type Name Description
    AssetWriterContext assetWriterContext

    The AssetWriterContext to load animations into.

    LoadBones(AssetWriterContext)

    Loads bone data into the given context if ExportSkinning is enabled, establishing bone structures and updating bind poses for rigging.

    Declaration
    public static void LoadBones(AssetWriterContext assetWriterContext)
    Parameters
    Type Name Description
    AssetWriterContext assetWriterContext

    The AssetWriterContext containing the root model and rigging options.

    LoadGeometryGroups(AssetWriterContext)

    Loads geometry groups (meshes and their associated data) into the given context.

    Declaration
    public static void LoadGeometryGroups(AssetWriterContext assetWriterContext)
    Parameters
    Type Name Description
    AssetWriterContext assetWriterContext

    The AssetWriterContext that will store geometry group mappings.

    LoadMaterials(AssetWriterContext)

    Loads materials and textures into the given context if ExportMaterials is enabled.

    Declaration
    public static void LoadMaterials(AssetWriterContext assetWriterContext)
    Parameters
    Type Name Description
    AssetWriterContext assetWriterContext

    The AssetWriterContext for which materials and textures will be loaded.

    LoadModels(AssetWriterContext)

    Loads the root model (and its children) from the given context's RootGameObject.

    Declaration
    public static void LoadModels(AssetWriterContext assetWriterContext)
    Parameters
    Type Name Description
    AssetWriterContext assetWriterContext

    The AssetWriterContext that will have its RootModel populated.

    Implements

    IAssetWriterContext
    IAwaitable
    In this article
    Back to top Generated by DocFX