Search Issue Tracker
Won't Fix
Won't Fix in 2023.2.X
Votes
0
Found in
2022.2.7f1
2023.1.0b3
2023.2.0a3
Issue ID
UUM-27854
Regression
Yes
Default List objects are used when BindProperty is used in Custom Editor script
Reproduction steps:
1. Open the attached project “ListRepro”
2. Open the “Assets/Scenes/SampleScene” scene
3. In the Hierarchy window select “Main Camera” GameObject
4. In the Inspector window inspect the “TestScript” script component
Expected result: A custom-made view is used to display List objects
Actual result: A default view is used to display List objects
Reproducible with: 2022.2.7f1, 2023.1.0a26, 2023.1.0b3, 2023.2.0a3
Not reproducible with: 2021.3.18f1, 2023.1.0a25
Couldn’t test with: 2020.3.45f1 - Errors in the user script
Reproducible on: macOS 13.1 (Intel)
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
- Assets are created in the Package folders when creating assets via custom buttons in the Inspector window or other windows
- “Select” windows are named differently on Windows and macOS
- [Windows] No minimum “Select” window size
- Enabling “Editor Extension Authoring” in UI Builder doesn’t dirty the document and saving with shortcut doesn’t persist the state
- WebRequest.Create() function fails with "URI prefix is not recognized" errors when the project is built for Linux Standalone or Windows Dedicated Server
Resolution Note:
When binding to a SerializedProperty, Unity sets a makeItem that creates a PropertyField and a bindItem that binds whatever BindableElement is in the item, to the property.
The provided code overrides the makeItem using a Label. There is no way to bind a GameObject to a Label out of the box.
The makeItem should either spawn an ObjectField, or the code should also implement a bindItem that would do the conversion from a GameObject SerializedProperty to Label text by fetching objects.GetArrayElementAtIndex(i).FindPropertyRelative("name") probably.
Resolution Note (2023.2.X):
When binding to a SerializedProperty, Unity sets a makeItem that creates a PropertyField and a bindItem that binds whatever BindableElement is in the item, to the property.
The provided code overrides the makeItem using a Label. There is no way to bind a GameObject to a Label out of the box.
The makeItem should either spawn an ObjectField, or the code should also implement a bindItem that would do the conversion from a GameObject SerializedProperty to Label text by fetching objects.GetArrayElementAtIndex(i).FindPropertyRelative("name") probably.