Unity Help with the list of Enums being really glitchy. And I really really need some help.

As you can see in the you tube video, I’ve created an enum for my tech and I created a list to store unlocked techs. But the thing is the list is very glitchy even when the game is not running and when am trying to manually assign techs to the lists. I’ve no idea what went wrong really. I’ve been struggling with this issue for days and honestly its killing my drive and driving me mad.

So yea please help ? anyone ? Someone ? I don’t even know how to describe the issues as this issue really hurts my brain so I just made an YouTube video to better demonstrate.

I really really need help.

Enums are really bad in Unity3D if you intend them to be serialized:

It is much better to use ScriptableObjects for many enumerative uses. You can even define additional associated data with each one of them, and drag them into other parts of your game (scenes, prefabs, other ScriptableObjects) however you like. References remain rock solid even if you rename them, reorder them, reorganize them, etc. They are always connected via the meta file GUID.

1 Like

Am here to say that the issue has been resolved, The reason for this behavior is cause I was using Int Enums, so it does not matter what the Enum name is as long as they have same int values, its just going to pick the first one it comes across that has the given int value.

I’m not sure why you would ever have duplicate values in an enum, basically defeats the purpose https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1069