Description
The ImageFile
property of the Editor.AssetType
class represents an asset type specifically for image files. This includes common image formats such as PNG and JPG. It is a static property, meaning it can be accessed without instantiating the AssetType
class.
Usage
Use the ImageFile
property when you need to specify or check for an asset type that corresponds to image files within the editor. This is particularly useful when filtering assets or when performing operations that are specific to image files.
Example
// Example of using the ImageFile property
Editor.AssetType imageAssetType = Editor.AssetType.ImageFile;
// Check if an asset is of type ImageFile
bool isImageFile = someAsset.Type == Editor.AssetType.ImageFile;
// Use in a method that requires an asset type
void ProcessAsset(Editor.AssetType assetType)
{
if (assetType == Editor.AssetType.ImageFile)
{
// Handle image file processing
}
}