Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Work Around For "FIRST ARRAY ELEMENT EXPANSION IS BROKEN" Bug

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

  1. TKilgannon

    TKilgannon

    Joined:
    Mar 9, 2022
    Posts:
    4
    Hey guys,

    Much like a lot of you, I've run into the bug where the first element in an array or list in the inspector is broken and won't let you edit it properly. However, I believe I've found a work around people can use until this bug is fixed.

    I found that this bug doesn't appear if you are using a custom inspector. Now, some of you might not want to make a custom inspector, or might not be at the stage where you want to implement custom inspectors, but the good news is this works even if all you do is import the Default Inspector into your custom inspector.

    2022-06-11 (2).png

    Unity already has documentation on how to create this so I'll just link it here: https://docs.unity3d.com/Manual/UIE-HowTo-CreateCustomInspector.html

    Unfortunately any Attributes you use (such as the [Header] attribute) won't show up but I figure that's better than not being able to edit the first property in your arrays/lists.

    Hopefully this is helpful for some of you guys, and hopefully Unity fixes this issue the LTS versions soon!
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,204
    I made mine NonReorderable, which also works
     
  3. TKilgannon

    TKilgannon

    Joined:
    Mar 9, 2022
    Posts:
    4
    Oh, that is good to know, a lot less work if you don't need the reorderable functionality intact.
     
    DevDunk likes this.
  4. egor-7355

    egor-7355

    Joined:
    Sep 29, 2016
    Posts:
    6
    Any news on the fixes though? Non-reordarable is not ideal (because um no reordering), and custom inspector is a lot of work for every list — though it's nice to know in case bug won't be fixed soon, thanks!

    One other obvious thing that you can do is just reorder the first element to be the second one, edit it, and then reorder back.
     
    TKilgannon likes this.
  5. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,204
    I think it's fixed in the alpha and 2022 tech stream, with 2021 LTS being planned for release (hopefully next release)
     
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,204
    Fixed in 2021.3.5f1