Search Issue Tracker
Fixed
Fixed in 2021.3.14f1, 2022.1.23f1, 2022.2.0b16, 2023.1.0a17
Votes
0
Found in
2020.3.38f1
2021.3.8f1
2022.1.13f1
2022.2.0b5
2023.1.0a6
Issue ID
UUM-11944
Regression
No
[IL2CPP] "Object must be the same type as the enum" on call to Enum.CompareTo
How to reproduce:
1. Open the attached project (“IN-11189_repro.zip“)
2. Build And Run standalone player
Expected result: "Object must be the same type as the enum" exception is not thrown
Actual result: "Object must be the same type as the enum" exception is thrown
Reproducible with: 2020.3.38f1, 2021.3.8f1, 2022.1.13f1, 2022.2.0b5, 2023.1.0a6
Reproducible on:
macOS 12.4 (Intel)
Windows 10
ArgumentException: Object must be the same type as the enum. The type passed in was 'PlayerAnimation'; the enum type was 'PlayerAnimation'.
at System.Enum.CompareTo (System.Object target) [0x00000] in <00000000000000000000000000000000>:0
at System.Collections.Comparer.Compare (System.Object a, System.Object b) [0x00000] in <00000000000000000000000000000000>:0
at System.Collections.Generic.ObjectComparer{{1[T].Compare (T x, T y) [0x00000] in <00000000000000000000000000000000>:0 at System.Collections.Generic.SortedDictionary}}2+KeyValuePairComparer[TKey,TValue].Compare (System.Collections.Generic.KeyValuePair{{2[TKey,TValue] x, System.Collections.Generic.KeyValuePair}}2[TKey,TValue] y) [0x00000] in <00000000000000000000000000000000>:0
at System.Collections.Generic.SortedSet{{1[T].FindNode (T item) [0x00000] in <00000000000000000000000000000000>:0 at System.Collections.Generic.SortedSet}}1[T].Contains (T item) [0x00000] in <00000000000000000000000000000000>:0
at System.Collections.Generic.SortedDictionary`2[TKey,TValue].ContainsKey (TKey key) [0x00000] in <00000000000000000000000000000000>:0
at Test.Start () [0x00000] in <00000000000000000000000000000000>:0
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "ShaderGraph" misses a space in the "Project Settings" section
- UI Builder inspector’s checkbox fields can be activated when clicking anywhere in the value field
- Unity icon is poorly visible in the "Build Profiles" window when "Dark" editor theme is selected
- UI Toolkit Transition Animation is ignored when background-size property has a starting value of 0
- Error "Assertion failed on expression: 'i->previewArtifactID == found->second.previewArtifactID'" is present when creating Render Texture
Add comment