Unity Issue Tracker - ArgumentOutOfRangeException is thrown when entering the PlayMode
Fixed
UUM-83345
ArgumentOutOfRangeException is thrown when entering the PlayMode
Unity: UI Toolkit Controls
UIElement - List
Fixed
2022.3.X
Fixed an ArgumentOutOfRangeException thrown when entering PlayMode with the selection containing multiple objects with array/list fields.
Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Scenes/OctopathLHDv1.unity” Scene
3. Select all 8 “CarStackParent” GameObjects in the Hierarchy window (selecting 2 or more causes the error)
4. Change the "Spawn Offset" value to 0.7 in the Inspector window
5. In the Game view tab select “Play Focused“ or “Play Unfocused”
6. Enter the Play Mode
7. Observe the Console window
Expected result: No errors are thrown
Actual result: “ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.” error is thrown