The IsDeleted
property indicates whether an asset has been deleted. This can occur if the Delete
method has been called on the asset, or if the AbsolutePath
property is empty, suggesting the asset no longer exists on disk.
The IsDeleted
property indicates whether an asset has been deleted. This can occur if the Delete
method has been called on the asset, or if the AbsolutePath
property is empty, suggesting the asset no longer exists on disk.
Use the IsDeleted
property to check if an asset is still available or has been removed. This is particularly useful when managing assets dynamically and ensuring that operations are not performed on non-existent assets.
// Example of checking if an asset is deleted Editor.Asset asset = GetAsset(); if (asset.IsDeleted) { // Handle the deleted asset scenario // For example, log a message or remove it from a list Log.Warning($"Asset {asset.Name} has been deleted."); } else { // Proceed with operations on the asset Log.Info($"Asset {asset.Name} is available."); }