Reproduction steps:
- Open any Unity project
- Go to the Edit → Preferences → Languages
- Select any language except English in “Editor Language”
Expected result: No errors in the Console
Actual result: Errors in the Console
Reproducible with: 2022.2.0a1, 2022.2.0b8, 2023.1.0a10
Not reproducible with: 2020.3.40f1, 2021.3.11f1, 2022.1.17f1, 2023.1.0a11
Reproduced on: Windows 10
Note: To successfully reproduce the issue, Language Packs have to be installed. The same errors are also thrown when entering the Play mode
Part of the error: ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <93b14d548eed4cc88574ab296ba2e94c>:0)
UnityEditor.GameView.DoToolbarGUI () (at <633f759ce7e144cbb741483fcb62a54d>:0)
UnityEditor.GameView.OnGUI () (at <633f759ce7e144cbb741483fcb62a54d>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <633f759ce7e144cbb741483fcb62a54d>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <633f759ce7e144cbb741483fcb62a54d>:0)
UnityEditor.DockArea.OldOnGUI () (at <633f759ce7e144cbb741483fcb62a54d>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect,