Search Issue Tracker
Fixed in 2018.2.8f1
Fixed in 2018.1.X, 2018.2.X
Votes
0
Found in
2018.2.0f2
Issue ID
1059122
Regression
No
UnsafeUtility.GetFieldOffset returns negative values about Enum fields in a build when the Enum is declared in a class
Repro steps:
1. Open attached project
2. Enter Play Mode and observe the values in Game View
3. Exit Play Mode
4. File -> Build and Run
5. Play the game and observe the values again
Expected: value_ is non-negative
Actual: value_ is negative
Reproducible with: 2018.1.9f1, 2018.2.0f2
Notes:
- Only in .NET 4.x
- The Class must have a reference to another Class and an Enum variable
- The Enum variable must be declared next to the Class reference
- This doesn't happen when there's a typeof(Enum) statement
Fixed in: 2018.3.0a10
Backported to: 2018.2.8f1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Audio Mixer does not change volume when lowering volume on an Audio Mixer loaded from AssetBundles
- Error “Value cannot be null. Parameter name: key UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)” thrown and Addressables build fails when "Include in Build" is disabled and using Addressables For Android package
- “error CS0433: The type 'CodeBinaryOperatorType' exists in both 'System.CodeDom and 'System" compilation errors are thrown when opening a specific project
- Metal Vertex Shader warning is being thrown when creating a VR Template Project
- Asset database warning is thrown when declaring font variable in the USS text file
Add comment