Search Issue Tracker
By Design
Votes
0
Found in
5.4.0b10
Issue ID
781646
Regression
No
Enum field does not retain value but rather position of the value in the list
Steps to reproduce:
1. Create new project
2. Create empty game object and add empty script to it
3. Paste this into the said script:
public enum BuggyEnums {
One,
Two,
//Five,
Three,
Four
}
public BuggyEnums bug;
(Note the commented line)
4. Go to the inspector of the object and select enum value "Three"
5. Open the script again and uncomment line "Five", save the script
6. Open up inspector again for the said object and notice that value is now "Five" instead of "Three"
Actual result: Enum retains its value based on the position of the entry in the list
Expected result: Enum keeps the value it is assigned, regardless of its position
Tested and reproduced on:
Windows 10
Unity 5.2.4p1, 5.3.4p2, 5.4.0b13
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- UI Overlay Image gets darker on each Camera when multiple Cameras are used
- Assertion failed on expression: 'scriptedImporterClass == SCRIPTING_NULL error when opening the standalone profiler window
- Disabled assets in Import Unity Package window aren't tracked but count as being selected by user
- [Windows] Crash on GetManagerFromContext when video is playing and creating High Definition 3D Projects after FMOD failed to switch back to normal output Error appeared
- GC Alloc produced when adding items to MultiColumnListView with Auto Assign Binding
Add comment