Search Issue Tracker
By Design
Votes
0
Found in
2021.2
2022.1
2022.1.0b6
2022.2
Issue ID
1401571
Regression
No
OrderBy function called in 'MenuService.cs' instead of ThenBy
Calling OrderBy on the results of a call to OrderBy introduces a new primary ordering that ignores the previously established ordering
Reproduction steps:
1. Observe the 'MenuService.cs' file
Actual result:
var children = sorted ? (IEnumerable<MenuItemsTree<T>>)m_Children.OrderBy(c => c.key).OrderBy(c => c.m_Priority) : m_Children;
Expected result:
var children = sorted ? (IEnumerable<MenuItemsTree<T>>)m_Children.OrderBy(c => c.key).ThenBy(c => c.m_Priority) : m_Children;
Reproducible with: 2021.2.0a5, 2022.1.0b14, 2022.2.0a9
Could not test with: 2021.2.0a4 (No 'MenuService.cs' file available)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shader Graph Swizzle Node Input/Output and Mask Update Incorrectly After Undo
- [URP] Crash on GameObject::QueryComponentByType when baking a Reflection Probe in an unsaved/untitled Scene
- No Icons are used for the Entry and Exit States in the Inspector when selected in an Animator Controller
- Crash on PlayerMain(int, char const**) when exiting Standalone Player with a Particle System in the Scene
- No Icon is used for the Runtime Animator Controller Type in a Search Window when assigning an Animator Controller in the Animator Component
Resolution Note:
Priority field has precedence over the key, which is correct with the current orderby query. Arguably, using thenby and reversing the order of the calls would make it more readable, but there is no real issue there.