Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug Error displaying nested arrays in the inspector

Discussion in 'Editor & General Support' started by Ichimitsu, May 4, 2021.

  1. Ichimitsu

    Ichimitsu

    Joined:
    Oct 9, 2014
    Posts:
    26
    After the transition to 2020.3.6, there was a problem with displaying nested arrays if there are more than two of them in the class. The picture shows an example. If you remove one array, or remove the nesting, the display is correct.

    Code (CSharp):
    1. public class NewBehaviourScript : MonoBehaviour
    2. {
    3.     [Serializable]
    4.     public class Test
    5.     {
    6.  
    7.         public List<GameObject> nestedTestArray01;
    8.         public List<Transform> nestedTestArray02;
    9.     }
    10.    
    11.     public List<Test> TestArray;
    12. }
    upload_2021-5-4_12-21-38.png
     
  2. Ben2390

    Ben2390

    Joined:
    Sep 6, 2014
    Posts:
    11
    I've tried 2020.2.6, 2020.3.7 & 2021.1.6 and got the same issue. I only wanted to upgrade to reorder arrays! I can now do that but cant get them to expand to edit.

    The only thing I've found to do so far is put in [NonReorderable] when you want to edit and remove [NonReorderable] when you want to move nested fields up and down.
     
    Last edited: May 8, 2021
    Lesh48 and Lekret like this.
  3. RobertMacGillivray

    RobertMacGillivray

    Joined:
    Feb 13, 2014
    Posts:
    10
    Just want to bump this and check to see if anyone here has submitted a proper bug report from within the editor so I don't bother duplicating it. Can also confirm that the [NonReorderable] hack works.
     
  4. Ichimitsu

    Ichimitsu

    Joined:
    Oct 9, 2014
    Posts:
    26
    The error disappeared after updating to 2020.3.8
     
  5. chegarty3

    chegarty3

    Joined:
    Sep 29, 2016
    Posts:
    1
    I'm still experiencing this issue with 2020.3.12. I was able to clear it up for a little while by deleting the entire Library folder and forcing it to rebuild but it did eventually reappear.
    Typically after restarting Unity it will work for a very short period of time before starting again.
     
  6. AbelSierra

    AbelSierra

    Joined:
    Jul 19, 2018
    Posts:
    19
    Did you find any solution to this? I am still experiencing a similar issue in Unity 2020.3.21f1, but now it is when expanding serialized classes insode a nested list
     
  7. shieldgenerator7

    shieldgenerator7

    Joined:
    Dec 20, 2015
    Posts:
    39
    Im getting this too, in 2021.2.7f1 which is the latest version at the time of writing.
    It's drawing lists incorrectly, here's an example of a List of a custom ScriptableObject subtype, Color, and string:
    upload_2021-12-18_3-11-11.png
    upload_2021-12-18_3-11-26.png

    Interestingly, when you click on one of the elements in the list, it shows up while you hold down LMB. When you let go, it disappears again. It doesn't let you edit the element at all.

    The only fix Ive found is downgrading to Unity 2020, which Id prefer not to have to do. Anybody found any solution to this?
     
  8. glacuesta

    glacuesta

    Joined:
    Nov 30, 2017
    Posts:
    10
    I am seeing this EXACT same issue, including the LMB weirdness where they temporarily show up.
    I can't add stuff to my array now and I don't want to change Unity versions if possible. Anyone found a solution or workaround? Happy new year.
     
  9. Bronto5

    Bronto5

    Joined:
    Feb 25, 2020
    Posts:
    2
    Confirming the same issue with display of scriptable object array in version 2021.2.7f1.

    What is interesing the issue appears only on my second monitor and only if it is not set as a main monitor.

    upload_2022-1-14_15-15-50.png
     
    unity_LoQdl6dIpFeZHQ and vm_ait like this.
  10. ElPeanuto

    ElPeanuto

    Joined:
    Nov 15, 2019
    Posts:
    1
    Having the same problem in 2021.3.3f1.
    That said, its always only Element 0 that is messed up
    Also the clicking with LMB on element 1 stuff while element 0 is supposedly open also bugs it. But if element 0 is closed it works.
    The absolute jank solution i have right now is i create one extra element and set them up and by the end of it i move the 0' element down and delete it.
    Ubug.JPG ubug2.JPG
     
    MrCopycat, no00ob, ftejada and 3 others like this.
  11. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    154
    +1 Same issue here - 2021.3.3f1.
    -Nice workaround!
     
  12. FastKillteam1

    FastKillteam1

    Joined:
    Sep 20, 2017
    Posts:
    50
    2021.3.4f has the same problem STILL
     
  13. BlackSilence89

    BlackSilence89

    Joined:
    Mar 24, 2022
    Posts:
    6
    I am facing the same issue in "2021.3.3f1" . Same issue for all Beta Versions as well.
    The workaround, as already said, is create an additional element, move the 0 element at the end and edit it (And move again at 0 index). Very annoying.

    Thanks
     
    FastKillteam1 likes this.
  14. silver1911

    silver1911

    Joined:
    Jul 11, 2017
    Posts:
    5
  15. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    87
    Hi,

    I'm having same problem using Linux 20.04 LTS, since I updated to Unity 2021.3.3f1 LTS, and after update to 2021.3.4f1, the problem continues, could you fix it? plz

    upload_2022-6-2_15-48-6.png
     
    ftejada likes this.
  16. FastKillteam1

    FastKillteam1

    Joined:
    Sep 20, 2017
    Posts:
    50
    Both great workarounds, thanks for the brainstorm here!
     
  17. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,158
    Currently affected versions are 2020.3.35, 2021.3.3 and 2021.3.4. Use an earlier version of the engine to fix the issue.
     
    Ichimitsu likes this.
  18. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    87
    Great to see new bugs coming in recent LTS. How is it possible? It should be a very stable version of the engine.
     
    koriball, no00ob, ftejada and 3 others like this.
  19. Ichimitsu

    Ichimitsu

    Joined:
    Oct 9, 2014
    Posts:
    26
    I confirm the existence of the problem in 2021.3.3, 2021.3.4, 2020.3.35.

    The first element of an array/list (not nested) is displayed incorrectly (on top of the list)

    upload_2022-6-6_10-37-11.png
     
    Biliogadafr and RiverINN like this.
  20. steve_dy

    steve_dy

    Joined:
    Feb 20, 2014
    Posts:
    27
    Just checked and indeed, the problem can be found on latest LTS which is 2020.3.35, we downgraded to 2020.3.34 and the problem is not there.
     
    iSleepzZz and Biliogadafr like this.
  21. ScorphiusMultiplayer

    ScorphiusMultiplayer

    Joined:
    Nov 10, 2018
    Posts:
    66
    please fix it!
     
    Biliogadafr and RiverINN like this.
  22. SharpAccent

    SharpAccent

    Joined:
    Jul 19, 2018
    Posts:
    43
    jc, release at least a hotfix for these so we dont have to wait three weeks for .5f1! The latest LTS releases were horrible bad and rushed, what's happening unity
     
    no00ob, ftejada, Lekret and 3 others like this.
  23. hotroddd1

    hotroddd1

    Joined:
    Feb 12, 2018
    Posts:
    8
  24. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    Was just about to post about this issue...
    I am also having this bug.

    Unity version: 2021.3.4f1 LTS

    Issue: Any array in the inspector will not show the 0th index properly.

    Picture:
     
    IndieFist likes this.
  25. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    530
    I hope they will fix it iin 2021.3.5 working with Apple silicon is already hard and crashes alot
     
  26. NiklasMollerChalmers

    NiklasMollerChalmers

    Joined:
    Aug 25, 2021
    Posts:
    2
    Having the same issue in 2021.3.4f1. Did upgrade today to LTS and wasn't expecting these issues.

    upload_2022-6-14_14-17-35.png
     
  27. SharpAccent

    SharpAccent

    Joined:
    Jul 19, 2018
    Posts:
    43
    Ok, so I got a brainfart today and thought waht if it isn't reordable and it actually solved the issue.
    Just add
    [NonReorderable]
    on top of your list/array and it will render properly in the inspector, ofc you won't be able to reorder the arrays but at least they'll render correctly
     
    Kurt-Dekker likes this.
  28. Cornettu_

    Cornettu_

    Joined:
    Jun 12, 2021
    Posts:
    2
    The Unity team has already detected this error and it is expected that the patch to correct it will be released in version 2022.2.0a13.
     
  29. GameChangerNow

    GameChangerNow

    Joined:
    Nov 26, 2018
    Posts:
    3
    Same error in 2021.3.4f1, which beginner write those dumb code? again and again seriously?
    Capture.PNG
     
    IndieFist likes this.
  30. eliteforcevn

    eliteforcevn

    Joined:
    Oct 25, 2018
    Posts:
    47
    same in unity 2021.3.4f1
     
    joeconstable97 and IndieFist like this.
  31. OceanViewGames

    OceanViewGames

    Joined:
    Dec 26, 2019
    Posts:
    19
    DreamersINC likes this.
  32. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    Yay! Looks like it has been fixed on the next LTS patch:
    Code (CSharp):
    1. Fixed in: 2021.3.5f1
     
  33. firebird721

    firebird721

    Joined:
    Jun 8, 2022
    Posts:
    101
    VERSION 2022 - still with the problem

    upload_2022-7-13_0-27-4.png
     
  34. RistoPaasivirta

    RistoPaasivirta

    Joined:
    Aug 25, 2017
    Posts:
    20
    Happening in 2020.3.36f1
     
  35. firebird721

    firebird721

    Joined:
    Jun 8, 2022
    Posts:
    101
    I switched to 2022 and it was solved!
     
    ftejada likes this.
  36. SGJPile

    SGJPile

    Joined:
    Apr 11, 2022
    Posts:
    6
    Super annoying bug. We can't switch to 2021. We are on 2020.3.36f1 and hoped it was fixed with 2020.3.37f1...but,

    The issue appears to be (UUM-7683)and it is listed as a known issue for 2020.3.37 in the release notes.

    Inspector Framework: List element overlaps everything when using Serializable struct/class (UUM-7683)
     
  37. firebird721

    firebird721

    Joined:
    Jun 8, 2022
    Posts:
    101
    i use 2022 - it is solved, why cant you switch?
     
  38. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    154
    An infinite number of reasons - this is not the solution - unity needs to backport to older versions.
     
  39. nandovilla

    nandovilla

    Joined:
    Jun 22, 2016
    Posts:
    9
    Despite the list of known issues saying otherwise, the issue has been fixed in version 2020.3.37f1:

     
    Last edited: Aug 2, 2022
    IndieFist likes this.
  40. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    530
    I was released my game with this version and i get soo many crashes and anr, i roll back to unity 2020.3.25 and everything works fine
     
    nandovilla likes this.
  41. TenaciousDan

    TenaciousDan

    Joined:
    Jul 11, 2019
    Posts:
    32
    nandovilla likes this.
  42. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    905
    I had this error and found a workaround posted elsewhere on this forum. The issue is with Reorderable arrays/lists. The handle on the left allows you to reposition them. If you don't care for reorderable lists, use the inspector attribute [NonReorderable] in front of your field definition. The lists return to their old format and don't overlap. This'll work in all older versions with bugged reorderable lists
     
  43. domportera

    domportera

    Joined:
    Sep 12, 2013
    Posts:
    23
    Thank you for this tip. I've suffered these problems on a few of my personal projects for a long time now.

    Finally did something about it because the Visual Scripting editor straight up crashes the whole editor with this bug. Seems like a pretty significant issue that needs to be fixed, but your solution helped in the meantime
     
  44. TenaciousDan

    TenaciousDan

    Joined:
    Jul 11, 2019
    Posts:
    32
    Using [NonReorderable] attribute is not a workaround, it's a different solution that may or may not be acceptable for your specific use case. In my case, I want users to be able to reorder lists of my custom property so this is not a solution.
    I tried searching for this in Unity's issue tracker but all the issues I've found say that it's been fixed in my Unity version but it's clearly not the case for me...