Version 3.3.1.2

PreviewFieldAttributeDrawer<T> class

Namespace: Sirenix.OdinInspector.Editor.Drawers
Assembly: Sirenix.OdinInspector.Editor
[AllowGUIEnabledForReadonly]
public sealed class PreviewFieldAttributeDrawer<T> : OdinAttributeDrawer<PreviewFieldAttribute, T> where T : Object
Draws properties marked with PreviewFieldAttribute as a square ObjectField which renders a preview for UnityEngine.Object types. This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds.
Inheritance

Type Parameters

T

Constructors

PreviewFieldAttributeDrawer()
public PreviewFieldAttributeDrawer()

Methods

DrawPropertyLayout(GUIContent)
Draws the property.
protected override void DrawPropertyLayout(GUIContent label)
Parameters
UnityEngine.GUIContent label

Initialize()
protected override void Initialize()
Extension Methods