Search Issue Tracker
By Design
By Design in 2023.3.X
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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.
Resolution Note (2023.3.X):
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.