Class AssetExporterManager
The asset exporter manager class.
Inherited Members
Namespace: Evergine.Assets.Exporters
Assembly: Evergine.Assets.dll
Syntax
public class AssetExporterManager
Properties
AssetExporters
Gets the asset exporter dictionary.
Declaration
public static Dictionary<Type, IAssetExporter> AssetExporters { get; }
Property Value
Type | Description |
---|---|
Dictionary<Type, IAsset |
AssetTypes
Gets the asset types.
Declaration
public static Dictionary<string, Type> AssetTypes { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, Type> |
Methods
ExtractAssetItems(IAssetWithDirectory)
Extracts all the asset items of the content directory.
Declaration
public static List<AssetItem> ExtractAssetItems(IAssetWithDirectory parentAsset)
Parameters
Type | Name | Description |
---|---|---|
IAsset |
parentAsset | The parent asset. |
Returns
ExtractAssets(ContentDirectory)
Extracts all the asset items of the content directory.
Declaration
public static DirectoryMetaFile ExtractAssets(ContentDirectory parentDirectory)
Parameters
Type | Name | Description |
---|---|---|
Content |
parentDirectory | The content directory. |
Returns
Type | Description |
---|---|
Directory |
The directory metafile. |
GetProjectContent(string)
Gets the contents of a project.
Declaration
public static ContentDirectory GetProjectContent(string rootPath)
Parameters
Type | Name | Description |
---|---|---|
string | rootPath | The root directory path. |
Returns
Type | Description |
---|---|
Content |
The root content directory. |
ImportAsset(ContentElement)
Imports an asset.
Declaration
public static IAssetMetaFile ImportAsset(ContentElement assetElement)
Parameters
Type | Name | Description |
---|---|---|
Content |
assetElement | The asset element. |
Returns
Type | Description |
---|---|
IAsset |
The asset metafile of the asset. |
ImportAssetItem(ContentElement, IAssetWithDirectory)
Imports an asset item.
Declaration
public static AssetItem ImportAssetItem(ContentElement assetElement, IAssetWithDirectory parentAsset)
Parameters
Type | Name | Description |
---|---|---|
Content |
assetElement | The content element of the asset. |
IAsset |
parentAsset | The container parent asset (usually a directory). |
Returns
Type | Description |
---|---|
Asset |
The AssetItem object representing the asset. |
MetaFileFromSource(IAssetSource, ContentFile)
Gets a metafile from a source object.
Declaration
public static IAssetMetaFile MetaFileFromSource(IAssetSource source, ContentFile sourceFile)
Parameters
Type | Name | Description |
---|---|---|
IAsset |
source | The source object. |
Content |
sourceFile | The source file. |
Returns
Type | Description |
---|---|
IAsset |
The metafile. |
ReadAsset(ContentFile)
Reads an asset meta file from a content file.
Declaration
public static IAssetMetaFile ReadAsset(ContentFile file)
Parameters
Type | Name | Description |
---|---|---|
Content |
file | The file. |
Returns
Type | Description |
---|---|
IAsset |
The deserialized meta file asset. |
WriteAsset(IAssetMetaFile, string, ContentDirectory)
Writes a metafile info into a file.
Declaration
public static ContentFile WriteAsset(IAssetMetaFile asset, string name, ContentDirectory directory)
Parameters
Type | Name | Description |
---|---|---|
IAsset |
asset | The asset meta file. |
string | name | The name of the file. |
Content |
directory | The target directory. |
Returns
Type | Description |
---|---|
Content |
The content file. |
WriteAsset<T>(T, string, ContentDirectory)
Writes a metafile info into a file.
Declaration
public static ContentFile WriteAsset<T>(T asset, string name, ContentDirectory directory) where T : IAssetMetaFile
Parameters
Type | Name | Description |
---|---|---|
T | asset | The asset meta file. |
string | name | The name of the file. |
Content |
directory | The target directory. |
Returns
Type | Description |
---|---|
Content |
The content file. |
Type Parameters
Name | Description |
---|---|
T | The asset generic type. |