Class AssetsCache
Helper class for asset cache files.
Namespace: Evergine.Assets.Utils
Assembly: Evergine.Assets.dll
Syntax
public class AssetsCache
Constructors
AssetsCache(ExportContext)
Initializes a new instance of the AssetsCache class.
Declaration
public AssetsCache(ExportContext exportContext)
Parameters
Type | Name | Description |
---|---|---|
ExportContext | exportContext | The export context. |
Properties
CacheFilePath
Gets the cache file path.
Declaration
public string CacheFilePath { get; }
Property Value
Type | Description |
---|---|
string |
Methods
Add(AssetItem, ExportResult)
Adds the specified asset item.
Declaration
public void Add(AssetItem assetItem, ExportResult exportResult)
Parameters
Type | Name | Description |
---|---|---|
AssetItem | assetItem | The asset item. |
ExportResult | exportResult | The asset export result. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Exists(AssetItem, out string)
Checks if the asset export exists in the output directory and if the hash is valid.
Declaration
public bool Exists(AssetItem assetItem, out string exportOutput)
Parameters
Type | Name | Description |
---|---|---|
AssetItem | assetItem | The asset item. |
string | exportOutput | The export output file. |
Returns
Type | Description |
---|---|
bool |
|
Invalidate(AssetItem)
Invalidates the cached information of the specified asset.
Declaration
public bool Invalidate(AssetItem assetItem)
Parameters
Type | Name | Description |
---|---|---|
AssetItem | assetItem | The asset item. |
Returns
Type | Description |
---|---|
bool |
|
Save()
Saves this instance.
Declaration
public void Save()