Adding array elements to a prefab instance sets the elements to null

Issue #582 new
Jannik Zinnäcker created an issue


Windows 10 Pro

Unity 2018.4.8f1 (an upgrade is not an option for our project)

Odin Inspector & Serializer v2.1.4

using Sirenix.OdinInspector;

public class ArrayContainer : SerializedMonoBehaviour
    public ArrayElement[] elements = new ArrayElement[4];

using Sirenix.OdinInspector;

public class ArrayElement
    [HorizontalGroup("Name", width: 0, LabelWidth = 30.0f)]
    public bool var;


  • Open an empty Scene in the editor and create an instance of the ArrayPrefab (the bug does only appear when editing a prefab instance and not whan editing the prefab)
  • Add an ArrayElement to the ArrayContainer in the inspector. Sometimes the first one you add works correctly.
  • If you continue adding Elements, instead of the ArrayElement null is added.

Comments (1)

  1. Jannik Zinnäcker reporter

    It seems like the Layout Groups are responsible for this behaviour. If you leave them out everything works fine.

  2. Log in to comment