The LastOpened
property of the Editor.Asset
class provides information about the last time an asset was opened through the editor. This property is useful for tracking asset usage and determining when an asset was last accessed.
The LastOpened
property of the Editor.Asset
class provides information about the last time an asset was opened through the editor. This property is useful for tracking asset usage and determining when an asset was last accessed.
To access the LastOpened
property, you need to have an instance of the Editor.Asset
class. The property returns a nullable DateTime
value, which means it can hold a valid date and time or be null
if the asset has never been opened.
Example usage:
Editor.Asset myAsset = GetAsset();
DateTime? lastOpened = myAsset.LastOpened;
if (lastOpened.HasValue)
{
// Do something with lastOpened.Value
}
else
{
// Handle the case where the asset has never been opened
}
Editor.Asset myAsset = GetAsset(); DateTime? lastOpened = myAsset.LastOpened; if (lastOpened.HasValue) { // Do something with lastOpened.Value } else { // Handle the case where the asset has never been opened }