Search Issue Tracker
By Design
Votes
0
Found in
2021.3.25f1
2022.2.20f1
2023.1.0b17
2023.2.0a15
2023.3.0a3
Issue ID
UUM-35888
Regression
No
The last element of an array is not displayed when using a ListView of elements with a custom PropertyDrawer
How to reproduce:
1. Open the attached project "UIToolkit Test.zip"
2. Open Test>Open Dialog ...
Expected results: 3 array elements are displayed in the "DisplayDialog" window
Actual results: "InvalidOperationException: The operation is not possible when moved past all properties (Next returned false)" thrown in the Console window and only 2 array elements are displayed
Reproducible with: 2021.3.25f1, 2022.2.20f1, 2023.1.0b17, 2023.2.0a15
Could not test with: 2020.3.48f1 (compilation errors in the Console window)
Reproducible on: Windows 10
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
- Manual reference page for Grid Selection is missing
- Awaitable.NextFrameAsync causes GC Alloc 0.7 KB when using CancellationToken
- Prefab "Overrides" list item popups are overridden when navigating with keyboard arrow keys
- Alpha Tolerance setting does not affect generated outlines when generating Custom Physics Shape in the Sprite Editor
- The information/help message section misses a margin in the "Profiler" window
Resolution Note:
The problem lies within the property drawer. A SerializedProperty is already an iterator. Invoking GetEnumerator alters the state of the SerializedProperty, causing it to no longer reference the original property and move on to the next one. To avoid this, it's advisable to create a local copy of the SerializedProperty, leaving the original one unaffected.
Consider implementing the following approach to mitigate the issue:
```Before accessing the iterator, make a local copy of the SerializedProperty using:
property = property.Copy()```
This step ensures that the original SerializedProperty remains unaltered during subsequent operations.