Preview Field Attribute

Draws 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.

public Object RegularPreviewField;

public string A, B, C;

[PreviewField(50, ObjectFieldAlignment.Right)]
[HorizontalGroup("row1", 50), VerticalGroup("row1/right")]
public Object D;

[PreviewField(50, ObjectFieldAlignment.Left)]
[HorizontalGroup("row2", 50), VerticalGroup("row2/left")]
public Object E;

[VerticalGroup("row2/right"), LabelWidth(-54)]
public string F, G, H;

[PreviewField("preview", FilterMode.Bilinear)]
public Object I;

private Texture preview;

private void CreateData()
    RegularPreviewField = ExampleHelper.GetTexture();
    D = ExampleHelper.GetTexture();
    E = ExampleHelper.GetTexture();
    I = ExampleHelper.GetMesh();
    preview = ExampleHelper.GetTexture();

    "These object fields can also be selectively enabled and customized globally " +
    "from the Odin preferences window.\n\n" +
    " - Hold Ctrl + Click = Delete Instance\n" +
    " - Drag and drop = Move / Swap.\n" +
    " - Ctrl + Drag = Replace.\n" +
    " - Ctrl + drag and drop = Move and override.")]
private void ConfigureGlobalPreviewFieldSettings()