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, IAssetExporter> |
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 |
---|---|---|
IAssetWithDirectory | parentAsset | The parent asset. |
Returns
Type | Description |
---|---|
List<AssetItem> | The directory metafile. |
ExtractAssets(ContentDirectory)
Extracts all the asset items of the content directory.
Declaration
public static DirectoryMetaFile ExtractAssets(ContentDirectory parentDirectory)
Parameters
Type | Name | Description |
---|---|---|
ContentDirectory | parentDirectory | The content directory. |
Returns
Type | Description |
---|---|
DirectoryMetaFile | 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 |
---|---|
ContentDirectory | The root content directory. |
ImportAsset(ContentElement)
Imports an asset.
Declaration
public static IAssetMetaFile ImportAsset(ContentElement assetElement)
Parameters
Type | Name | Description |
---|---|---|
ContentElement | assetElement | The asset element. |
Returns
Type | Description |
---|---|
IAssetMetaFile | 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 |
---|---|---|
ContentElement | assetElement | The content element of the asset. |
IAssetWithDirectory | parentAsset | The container parent asset (usually a directory). |
Returns
Type | Description |
---|---|
AssetItem | 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 |
---|---|---|
IAssetSource | source | The source object. |
ContentFile | sourceFile | The source file. |
Returns
Type | Description |
---|---|
IAssetMetaFile | The metafile. |
ReadAsset(ContentFile)
Reads an asset meta file from a content file.
Declaration
public static IAssetMetaFile ReadAsset(ContentFile file)
Parameters
Type | Name | Description |
---|---|---|
ContentFile | file | The file. |
Returns
Type | Description |
---|---|
IAssetMetaFile | 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 |
---|---|---|
IAssetMetaFile | asset | The asset meta file. |
string | name | The name of the file. |
ContentDirectory | directory | The target directory. |
Returns
Type | Description |
---|---|
ContentFile | 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. |
ContentDirectory | directory | The target directory. |
Returns
Type | Description |
---|---|
ContentFile | The content file. |
Type Parameters
Name | Description |
---|---|
T | The asset generic type. |