Search Issue Tracker
By Design
Votes
0
Found in
2019.3.0a7
2019.3.10f1
2020.1
2020.2
Issue ID
1239357
Regression
No
ListView renders one-too-many items when bound to a SerializedProperty
How to reproduce:
1. Open user-submitted project (ListViewBug.zip)
2. Select the TestAsset.asset in the Project window
3. See the ListView in the Inspector
Expected result: only 3 elements are bound
Actual result: 3 elements + 1 additional element beyond the size of the array are bound
Reproducible with: 2019.3.0a7, 2019.3.13f1, 2020.1.0b8, 2020.2.0a11
Could not test with: 2017.4.40f1, 2018.4.22f1, 2019.3.0a6 (incompatibility issues)
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
- Crash on PrepareDrawShadowsCommandStep1 when entering the Play Mode in a specific project
- Physics Layer Collision Matrix's Layer names, checkboxes and hover highlights become misaligned when the Editor's UI Scaling gets changed
- Light/shadow information on an edge of a Terrain tile creates a seam with an adjacent Terrain tile when baking a LightMap
- "Missing types referenced from component UniversalRenderPipelineGlobalSettings on game object UniversalRenderPipelineGlobalSettings..." warning is thrown after switching the Platform to tvOS
- “Metal: Error creating pipeline state (Universal Render Pipeline/2D/Sprite-Lit-Default): Vertex attribute BLENDINDICES0(5) of type uint4 cannot be read using MTLAttributeFormatFloat2 (null)“ when setting GPU Skinning to GPU after opening the project
Resolution Note:
This behaviour is expected currently because of the way SerializedProperty works with regards to Arrays/List.
When enumerating properties of an array the first one is always the collection size (by default if you do not specify a custom make item it shows an integer field to edit array size).
That being said since 2020.1 we now provide a way "showBoundCollectionSize" property on ListView to skip this first element. Set it false will give you would expect.