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;
}