Layout inconsistency when ListDrawerSettings Expanded parameter is TRUE

Issue #652 new
Michael Ryan created an issue

Reproducible in Unity 2019.3.1f1 with Odin 2.1.11. Editor-only mode is enabled. I’m running Windows 10 v1909 (build 18363.720).

There appears to be a bug or layout inconsistency when the Expanded parameter of the ListDrawerSettings atttribute is true.

The following is drawn in the Inspector correctly (see section A in the following image). Please note, the Inspector width is at the default minimum width allowed by drag-resizing the Inspector in Unity.

[BoxGroup("Temporary Data")]
[HideReferenceObjectPicker]
[LabelText("Mesh Triangles")]
[ListDrawerSettings(IsReadOnly = true)]
[ShowInInspector]
public List<TriangleListElement> MeshTrianglesList { get; private set; } = new List<TriangleListElement>();

When the Expanded parameter is added, the list label text no longer overlaps with the list item count, however the content width is increased and content is clipped by the Inspector at the right and information is lost (see section B).

[ListDrawerSettings(Expanded = true, IsReadOnly = true)]

It's nice that the list label no longer overlaps with the item count, however the overlap is better than the list content width changing.

I should point out that the “Mesh Vertices” list shown in the image is also clipped, but that is due to it having the same BoxGroup ID and the entire group being resized when the “Mesh Triangles” content is widened. When the BoxGroup attribute is removed, the “Mesh Vertices” list reverts to its correct with and only the “Mesh Triangles” list has the wrong width.

While not shown in the attached image, the rest of the inspector draws correctly. No other parts of the component (or other components) are clipped at the right.

I also disabled a custom property drawer I have for TriangleListElement and the content width still changes, so it doesn’t appear to be related to any of my code.

Comments (5)

  1. Log in to comment