Class AssetMetafile<TProfile, TExporter>
The asset file class.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Assets.Exporters
Assembly: Evergine.Assets.dll
Syntax
public abstract class AssetMetafile<TProfile, TExporter> : IdentifiableObject, IAssetMetaFile where TProfile : AssetProfile where TExporter : IAssetExporter
Type Parameters
Name | Description |
---|---|
TProfile | The profile type. |
TExporter | The output type. |
Constructors
AssetMetafile(TProfile)
Initializes a new instance of the AssetMetafile<TProfile, TExporter> class.
Declaration
public AssetMetafile(TProfile defaultProfile)
Parameters
Type | Name | Description |
---|---|---|
TProfile | defaultProfile | the default profile. |
Properties
DefaultProfile
Gets or sets the default profile.
Declaration
[EvergineMember]
public TProfile DefaultProfile { get; protected set; }
Property Value
Type | Description |
---|---|
TProfile |
ExportAsRaw
Gets or sets a value indicating whether this assets will be exported as raw.
Declaration
public virtual bool ExportAsRaw { get; set; }
Property Value
Type | Description |
---|---|
bool |
Exporter
Gets or sets the exporter.
Declaration
public TExporter Exporter { get; protected set; }
Property Value
Type | Description |
---|---|
TExporter |
ExtensionExported
Gets the extension.
Declaration
public string ExtensionExported { get; }
Property Value
Type | Description |
---|---|
string |
ExtensionMetafile
Gets the extension.
Declaration
public abstract string ExtensionMetafile { get; }
Property Value
Type | Description |
---|---|
string |
Name
Gets or sets the asset name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Profiles
Gets the asset profiles.
Declaration
[EvergineMember]
public IReadOnlyDictionary<string, TProfile> Profiles { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, TProfile> |
Methods
AddProfile(string, TProfile)
Adds a profile to the asset.
Declaration
public void AddProfile(string name, TProfile profile)
Parameters
Type | Name | Description |
---|---|---|
string | name | The profile name. |
TProfile | profile | The profile object. |
Export(ExportContext)
Exports the meta file.
Declaration
public Task<ExportResult> Export(ExportContext exportContext)
Parameters
Type | Name | Description |
---|---|---|
ExportContext | exportContext | The export context. |
Returns
Type | Description |
---|---|
Task<ExportResult> | An awaitable task of the operation, with the export result. |
GetExportOutputPath(ExportContext)
Gets the export output path.
Declaration
public string GetExportOutputPath(ExportContext exportContext)
Parameters
Type | Name | Description |
---|---|---|
ExportContext | exportContext | The export context. |
Returns
Type | Description |
---|---|
string | The export output path. |
GetProfile(string)
Gets the asset profile object from its name.
Declaration
public TProfile GetProfile(string profileName)
Parameters
Type | Name | Description |
---|---|---|
string | profileName | The profile name. |
Returns
Type | Description |
---|---|
TProfile | The profile object. |
GetProfileOrDefault(string)
Gets the specified profile from the metafile, or default profile.
Declaration
public TProfile GetProfileOrDefault(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The profile name. |
Returns
Type | Description |
---|---|
TProfile | The specified profile or default. |
RemoveProfile(string)
Removes a profile from the asset.
Declaration
public void RemoveProfile(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the profile to remove. |