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
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
Add comment