List of structs containing an enum often don't work correctly

Issue #203 duplicate
Former user created an issue

WHAT HAPPENED? Changing the enum in the inspector for one element of will often instead change the enum to what you selected for the wrong element. When this issue occurs, it is USUALLY the element 3 after the one you wanted to change. For instance, if I change the Type variable for element 0 to "Tool" then element 0 will stay what it was and element 3's Type variable will change to Tool. Sometimes, however, it affects a different element. Not sure why. This ONLY affects enums. Changing any other type of variable (that I've tested) does not produce the same issue. This does not happen with all elements and does not happen consistently. Sometimes restarting Unity will make it work correctly but only once. Sometimes restarting Unity doesn't help at all. Sometimes it's only the first element with the issue, but many times it's random elements. Seems like the longer I work with a list the more it messes up and less consistent the issue becomes.

HOW TO REPRODUCE: a. Make struct containing an enum variable. b. Make a list of that struct. c. Add multiple elements to the list in the inspector. d. (Possibly have to restart Unity to see this happen) e. Try to change the enum for the elements and see if any mess up.

EXAMPLE OF ISSUE HAPPENING: https://i.imgur.com/VdIS1DB.gif

VERSION: Using Unity 2017.1 with Odin 1.0.5.1 on Windows 10

Comments (2)

  1. Tor Esa Vestergaard

    This is actually a known issue right now, and we're edging closer to being able to figure it out. It's proving remarkably elusive to reproduce reliably, since even copy pasting directly the code and retreading the steps that cause it for people often isn't enough to cause it to happen reliably. We have however hit upon a few ways of reproducing it mostly reliably. This report is yet another data point.

    Thank you for the report! :)

  2. Log in to comment