PreviewFieldAttributeDrawer<T>

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.

namespace Sirenix.OdinInspector.Editor.Drawers
{
[Sirenix.OdinInspector.Editor.AllowGUIEnabledForReadonlyAttribute]
public sealed class PreviewFieldAttributeDrawer<T> : OdinAttributeDrawer<PreviewFieldAttribute, T>
where T : UnityEngine.Object
}

Requirements

Namespace: Sirenix.OdinInspector.Editor.Drawers
Assembly: Sirenix.OdinInspector
Version: 2.0.0.0

Methods

Return Type Definition Description
void DrawPropertyLayout(GUIContent) Draws the property.