Search Unity

Bug Unity 2021.3.3f1 List with custom class inspector bug

Discussion in 'Editor & General Support' started by Kreshi, May 21, 2022.

  1. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    446
    Hello,

    I want to report an Unity UI bug with Unity 2021.3.3f1.
    When creating a list of a custom class, the UI showing the list entries is broken for the first element.
    Check out the code below to reproduce the issue.

    Code (CSharp):
    1. using System.Collections.Generic;
    2. using UnityEngine;
    3.  
    4. public class ListWithCustomClassInspectorBug : MonoBehaviour
    5. {
    6.     [System.Serializable]
    7.     public class ListEntry
    8.     {
    9.         public int entry1;
    10.         public string entry2;
    11.     }
    12.  
    13.     [SerializeField] List<ListEntry> bugyListInInspector;
    14.  
    15.     // Start is called before the first frame update
    16.     void Start()
    17.     {
    18.        
    19.     }
    20. }
    21.  
    simply attach the script to a gameobject and add a new entry.

    Best regards,
    Kreshi
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,752
    Reporting bugs in the forum is not useful.

    Use the bug reporter from within Unity (Help-> Report A Bug).
     
    Kreshi likes this.
  3. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    446
    You are right. I follower your suggestion and filed an official bug report. Thanks :).
     
    AvalinAtWork and Kurt-Dekker like this.
  4. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    446
    Bump.

    I haven't had an answer to the bug-report yet so I am bumping this thread (maybe we are lucky and an Unity dev reads and priorizes it).
    It's weird that no one is running havoc about this critical issue yet o_O.
    Has anyone possibly found a work-around? (except downgrading the Unity version)

    EDIT:
    I found a workaround folks!
    Just change the order of the first and second entry so you can edit it, and change the order back again after editing. If you only have 1 entry, simply create a temporary second entry. Pretty simple actually - I really don't know why I didn't think of this straight away :D.
     
    Last edited: May 29, 2022
  5. romanhajduk8

    romanhajduk8

    Joined:
    Aug 5, 2019
    Posts:
    1
    Definitely Bump, for me this is critical issue that prevents me from setting up almost any new game data.

    Btw @Kreshi your workaround does not work properly, when I reorder an item to be at 0th index, I always lose most of the values in that item. For now I just add everywhere temporary unused item at 0th index and ignore it when working with the array.
     
    eudendeew and Kreshi like this.
  6. VisualDima

    VisualDima

    Joined:
    May 21, 2020
    Posts:
    19
    Same here. This is a critical blocker bug!
    @Kreshi , do you have a link to an issue tracker? I would like to vote
     
  7. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    446
    Unfortunately there is no issue tracker link live yet. I reported the bug like @Kurt-Dekker suggested and the only thing I have atm is an Unity Atlassian bug report entry with an open status :confused:.
    If there is any update on this case i will let you know :).
     
    VisualDima likes this.
  8. FastKillteam1

    FastKillteam1

    Joined:
    Sep 20, 2017
    Posts:
    50
    UP! I have also reported via bug report and its still open...
     
  9. KimmoFactor

    KimmoFactor

    Joined:
    Dec 29, 2020
    Posts:
    39
    I reported the same thing about week ago too and haven't heard back. Unity QA has been very slow processing bug reports this year, so I wouldn't expect anything to happen soon unless the devs themselves happen to spot this.
     
  10. eudendeew

    eudendeew

    Joined:
    Feb 5, 2017
    Posts:
    18
    Fix it, fix it, fix it
     
  11. FastKillteam1

    FastKillteam1

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

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,079
    Same for custom structs. This is not acceptable for what's supposed to be LTS.

    EDIT: 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.
     
    Last edited: Jun 3, 2022
  13. p_schmitz

    p_schmitz

    Joined:
    May 23, 2022
    Posts:
    1
    A partial workaround is that you can use tab and keyboard controls to navigate through the fields and enter data. Hopefully it is fixed soon.
     
  14. Klamore74

    Klamore74

    Joined:
    Jun 17, 2013
    Posts:
    103
    Guys is almost 20 days with this bug. What is going on?
     
  15. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,079