Class AssetMetaFileWithDirectory<TProfile, TExporter>
An asset with a resource element.
Inherited Members
Namespace: Evergine.Assets.Exporters
Assembly: Evergine.Assets.dll
Syntax
public abstract class AssetMetaFileWithDirectory<TProfile, TExporter> : AssetMetafile<TProfile, TExporter>, IAssetWithDirectory, IAssetMetaFile where TProfile : AssetProfile where TExporter : IAssetExporter
Type Parameters
Name | Description |
---|---|
TProfile | The profile class. |
TExporter | The exporter class. |
Constructors
AssetMetaFileWithDirectory(ContentDirectory, TProfile)
Initializes a new instance of the AssetMetaFileWithDirectory<TProfile, TExporter> class.
Declaration
public AssetMetaFileWithDirectory(ContentDirectory assetDirectory, TProfile defaultProfile)
Parameters
Type | Name | Description |
---|---|---|
ContentDirectory | assetDirectory | The source directory. |
TProfile | defaultProfile | the default profile. |
Properties
Assets
Gets the contained assets.
Declaration
public List<AssetItem> Assets { get; }
Property Value
Type | Description |
---|---|
List<AssetItem> |
SourceDirectory
Gets or sets the resource file.
Declaration
public ContentDirectory SourceDirectory { get; set; }
Property Value
Type | Description |
---|---|
ContentDirectory |
SourceDirectoryName
Gets the name of the directory that this asset should manage.
Declaration
public virtual string SourceDirectoryName { get; }
Property Value
Type | Description |
---|---|
string |
Methods
AddAssetItem(AssetItem)
Adds the asset item to the directory.
Declaration
public void AddAssetItem(AssetItem assetItem)
Parameters
Type | Name | Description |
---|---|---|
AssetItem | assetItem | The asset item. |
ChecksDirectoryIntegrity(ContentDirectory)
Checks the integrity of this asset. A common behavior is to check if the source directory is available.
Declaration
public virtual bool ChecksDirectoryIntegrity(ContentDirectory parentDirectory)
Parameters
Type | Name | Description |
---|---|---|
ContentDirectory | parentDirectory | The parent directory of this asset. |
Returns
Type | Description |
---|---|
bool | True if this assets pass the integrity check. |
EnumerateAllAssets()
Enumerates all assets in this directory and its children directory.
Declaration
public virtual IEnumerable<AssetItem> EnumerateAllAssets()
Returns
Type | Description |
---|---|
IEnumerable<AssetItem> | All assets in this directory and its children directory. |
FindAssetItem(string)
Gets an asset contained in the directory by its name.
Declaration
public AssetItem FindAssetItem(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The asset name. |
Returns
Type | Description |
---|---|
AssetItem | The asset item. |
FindAssetItem(string, Type, bool)
Gets an asset contained in the directory by its name.
Declaration
public AssetItem FindAssetItem(string name, Type type, bool recursive)
Parameters
Type | Name | Description |
---|---|---|
string | name | The asset name. |
Type | type | The type of the asset. |
bool | recursive | if the search is recursive. |
Returns
Type | Description |
---|---|
AssetItem | The asset item. |
FindAssetItem<T>(string, bool)
Gets an asset contained in the directory by its name.
Declaration
public AssetItem FindAssetItem<T>(string name, bool recursive = false) where T : IAssetMetaFile
Parameters
Type | Name | Description |
---|---|---|
string | name | The asset name. |
bool | recursive | if the search is recursive. |
Returns
Type | Description |
---|---|
AssetItem | The asset item. |
Type Parameters
Name | Description |
---|---|
T | The type of the asset. |
FindAssetItems(Type)
Gets an asset contained in the directory by its name.
Declaration
public List<AssetItem> FindAssetItems(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type of the asset. |
Returns
Type | Description |
---|---|
List<AssetItem> | The asset item. |
FindAssetItems<T>()
Gets an asset contained in the directory by its name.
Declaration
public List<AssetItem> FindAssetItems<T>() where T : IAssetMetaFile
Returns
Type | Description |
---|---|
List<AssetItem> | The asset item. |
Type Parameters
Name | Description |
---|---|
T | The type of the asset. |