Search Results for

    Show / Hide Table of Contents

    Class CreateAssetContext

    Importing/creating asset context structure

    Inheritance
    NonCopyable
    CreateAssetContext
    Inherited Members
    NonCopyable::NonCopyable()
    NonCopyable::NonCopyable(const NonCopyable& )
    NonCopyable::operator=(const NonCopyable& )
    Assembly: FlaxEngine.dll
    File: Engine/ContentImporters/Types.h
    Syntax
    public class CreateAssetContext : public NonCopyable

    Constructors

    ~CreateAssetContext()

    Finalizes an instance of the CreateAssetContext class.

    Declaration
    public ~CreateAssetContext()

    CreateAssetContext(const StringView& inputPath, const StringView& outputPath, const Guid& id, void* arg)

    Initializes a new instance of the CreateAssetContext class.

    Declaration
    public CreateAssetContext(const StringView& inputPath, const StringView& outputPath, const Guid& id, void* arg)
    Parameters
    StringView inputPath

    The input path.

    StringView outputPath

    The output path.

    Guid id

    The identifier.

    void arg

    The custom argument.

    Fields

    CustomArg

    Custom argument for the importing function

    Declaration
    public void* CustomArg
    Field Value
    void

    Data

    Asset file data container

    Declaration
    public AssetInitData Data
    Field Value
    AssetInitData

    InputPath

    Path of the input file (may be empty if creating new asset)

    Declaration
    public String InputPath
    Field Value
    String

    OutputPath

    Output file path

    Declaration
    public String OutputPath
    Field Value
    String

    SkipMetadata

    True if skip the default asset import metadata added by the importer. May generate unwanted version control diffs.

    Declaration
    public bool SkipMetadata
    Field Value
    bool

    TargetAssetPath

    Target asset path (may be different than OutputPath)

    Declaration
    public String TargetAssetPath
    Field Value
    String

    Methods

    AddMeta(JsonWriter& writer)

    Adds the meta to the writer.

    Declaration
    public void AddMeta(JsonWriter& writer) const
    Parameters
    JsonWriter writer

    The json metadata writer.

    AllocateChunk(int32 index)

    Allocates the chunk in the output data so upgrader can write to it.

    Declaration
    public bool AllocateChunk(int32 index)
    Parameters
    int32 index

    The index of the chunk.

    Returns
    bool

    True if cannot allocate it.

    Run(const CreateAssetFunction& callback)

    Runs the specified callback.

    Declaration
    public CreateAssetResult Run(const CreateAssetFunction& callback)
    Parameters
    CreateAssetFunction callback

    The import/create asset callback.

    Returns
    CreateAssetResult

    Operation result.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat