Search Unity

Bug Bug in Unity Inspector, Doesn't render properly the first sub element of element for a field

Discussion in 'Editor & General Support' started by ajeets1978, Jun 11, 2022.

  1. ajeets1978

    ajeets1978

    Joined:
    Mar 10, 2019
    Posts:
    25
    Code (CSharp):
    1.  
    2. public class LevelManager : Monobehaviour
    3. {
    4. [System.Serializable]
    5.     public class LevelObjective {
    6.         [SerializeField] List<GameObject> Objective;
    7.     }
    8.  
    9.     [SerializeField] List<LevelObjective> level;
    10. }
    11.  

    create a codee like above and you will see in inspector that it doesn't render the first sub-element properly, It will be overlayed by other elements below the 1st element. Which makes it impossible to work with.

    upload_2022-6-11_14-5-30.png
     

    Attached Files:

    Snake-M3 likes this.
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    It's a really annoying bug.
    You can add [NonReorderable] if the order is not important or make a custom inspector to fix this issue. Hopefully the next LTS will fix it, since the fix is already available in the tech stream