bool IsCached { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The IsCached property indicates whether the asset is currently loaded in memory. This property is useful for determining if an asset is readily available for use without needing to be reloaded from disk or another source.

Usage

To check if an asset is loaded, access the IsCached property on an instance of the Editor.Asset class. This property returns a boolean value, where true indicates that the asset is loaded, and false indicates that it is not.

Example

// Example of checking if an asset is cached
Editor.Asset myAsset = GetAsset(); // Assume GetAsset() retrieves an asset
bool isAssetCached = myAsset.IsCached;

if (isAssetCached)
{
    // Asset is loaded and ready to use
    // Perform operations with the asset
}
else
{
    // Asset is not loaded
    // Consider loading the asset or handling the case where it is not available
}