bool PrefersIconThumbnail { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The PrefersIconThumbnail property of the Editor.AssetType class indicates whether the asset type should use its icon as a thumbnail instead of any available preview image. This can be useful for asset types where the icon provides a clearer or more recognizable representation than a generated preview image.

Usage

To determine if an asset type prefers using its icon as a thumbnail, you can access the PrefersIconThumbnail property. This property returns a boolean value:

  • true - The asset type prefers using its icon as a thumbnail.
  • false - The asset type does not prefer using its icon as a thumbnail and may use a preview image instead.

Example

// Example of checking if an asset type prefers using its icon as a thumbnail
Editor.AssetType assetType = Editor.AssetType.Model;

if (assetType.PrefersIconThumbnail)
{
    // Use the icon as the thumbnail
    var icon = assetType.Icon64; // Example of using a 64x64 icon
}
else
{
    // Use a preview image as the thumbnail
    // Code to handle preview image
}