Serializable class/struct array incorrectly displayed in inspector

When I have a MonoBehaviour that contains an array with a serializable struct or class having multiple public members, it is not displayed correctly in the inspector, more specifically the first element, when it’s expanded. It still displays the remaining elements as if it is not expanded. I also noticed some slight space between the first and the remaining elements, if the first element is not expanded or the array contains non-expandable elements. Seems like some recent change, since I never noticed such an issue before. Attached is a screenshot.

EDIT: Unity version is 2021.3.3f1

Classes in the example contain following code:

using UnityEngine;

public class BugExample : MonoBehaviour
{
    public BugSerializableClass[] buggy;
}
[System.Serializable]
public class BugSerializableClass
{
    public int val1;
    public int val2;
    public int val3;
}
using UnityEngine;

public class BugExample2 : MonoBehaviour
{
    public int[] ints;
}

1 Like

UP

1 Like

UP!

1 Like

same problem with this version of unity =/

1 Like

Yeap, problem in 2021.3.3f1 too.

1 Like
1 Like

Me too, in 2021.3.4f1

2 Likes

not fixed in 2021.3.4f1

1 Like

I just tested with 2021.3.5f1 and this release fixed the List drawing problem.

1 Like