Class CreateAssetContext
Importing/creating asset context structure
Inheritance
CreateAssetContext
Assembly: FlaxEngine.dll
File: Engine/ContentImporters/Types.h
Syntax
public class CreateAssetContext : public NonCopyable
Constructors
~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
InputPath
Path of the input file (may be empty if creating new asset)
Declaration
public String InputPath
Field Value
String
|
OutputPath
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. |