ModelAsset
- Namespace: Turian.Engine.Core
- Source File: ModelAsset.cs
Represents a model asset, which can be used to load a 3D model from resolved asset content.
Public Methods
InvalidateCacheEntry
public static void InvalidateCacheEntry(Guid assetId)
Removes the cached Model for assetId and disposes it. Call this when an asset is reimported so the next access reloads from disk.
Parameters:
assetId(Guid)
ClearCache
public static void ClearCache()
Disposes all cached models and clears the cache. Call this on Vulkan device teardown.
GetContent
public Model? GetContent(Vulkan vulkan)
Gets the content of this model asset by reading the baked .ammesh blob the importer wrote into the asset cache. The returned Model is owned by the cache — do not dispose it.
Parameters:
vulkan(Vulkan): The Vulkan context used for loading the model.
Returns: Model?
- A loaded 3D model or
nullif the asset could not be found or loaded.