Class AAssetImporter<T>
This class represents an asset importer. This class convert and asset into a Evergine resource.
Inheritance
AAssetImporter<T>
Implements
Inherited Members
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
GenerateAdditionalAssets(Stream, T)
Indicates if this assets 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 require additional assets. |
ImportData(Stream, T, bool)
Import 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 | The asset is loaded as raw asset. |
ImportHeader(Stream, out T)
Import 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 content binary reader stream. |
bool | importData | If the asset must be preprocessed. |
bool | rawAsset | The asset is loaded as raw asset. |
Returns
Type | Description |
---|---|
T | The resource. |