Class AAssetImporter<T>
This class represents an asset importer. This class converts an asset into an Evergine resource.
Inheritance
AAssetImporter<T>
Implements
Namespace: Evergine.Framework.Assets.Importers
Assembly: Evergine.Framework.dll
Syntax
public abstract class AAssetImporter<T> : IAssetImporter where T : IAssetSource
Type Parameters
Name | Description |
---|---|
T | The importer type. |
Properties
Extensions
Gets the importer file extensions.
Declaration
public abstract string[] Extensions { get; }
Property Value
Type | Description |
---|---|
string[] |
Methods
ApplySettings(ProjectParameters)
Apply the project settings to the importer.
Declaration
public virtual void ApplySettings(ProjectParameters projectSettings)
Parameters
Type | Name | Description |
---|---|---|
ProjectParameters | projectSettings | The project settings. |
GenerateAdditionalAssets(Stream, T)
Indicates if this asset requires additional assets.
Declaration
public virtual bool GenerateAdditionalAssets(Stream stream, T resource)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The asset stream. |
T | resource | The current resource. |
Returns
Type | Description |
---|---|
bool | If the asset requires additional assets. |
ImportData(Stream, T, bool)
Imports the asset data.
Declaration
public abstract void ImportData(Stream stream, T resource, bool rawAsset = false)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream. |
T | resource | The output data. |
bool | rawAsset | Indicates whether the asset is loaded as a raw asset. |
ImportHeader(Stream, out T)
Imports the asset header.
Declaration
public abstract void ImportHeader(Stream stream, out T resource)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream. |
T | resource | The output header. |
ImportSource(Stream, bool, bool)
Decodes the resource.
Declaration
public T ImportSource(Stream stream, bool importData, bool rawAsset)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The binary reader stream containing the content. |
bool | importData | Indicates if the asset must be preprocessed. |
bool | rawAsset | Indicates if the asset is loaded as a raw asset. |
Returns
Type | Description |
---|---|
T | The resource. |