Class ShowAssetPreviewAttribute
Displays a preview image of the referenced asset in the Inspector.
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ShowAssetPreviewAttribute : PropertyAttribute
Inheritance
Remarks
This attribute adds a thumbnail preview of the object reference next to the field. Useful for textures, models, or any asset with a visual preview.
Constructors
ShowAssetPreviewAttribute(int, int)
Creates a new instance of the ShowAssetPreviewAttribute.
public ShowAssetPreviewAttribute(int width = 64, int height = 64)
Parameters
| Name | Type | Description |
|---|---|---|
width | int | Width of the preview image. Defaults to DefaultWidth. |
height | int | Height of the preview image. Defaults to DefaultHeight. |
Fields
DefaultHeight
The default height (in pixels) of the preview image.
public const int DefaultHeight = 64
Field Value
int
DefaultWidth
The default width (in pixels) of the preview image.
public const int DefaultWidth = 64
Field Value
int