Search Issue Tracker
Won't Fix
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
- Crash on ResizeScriptingList<ScriptingObjectPtr> when passing an undeclared variable to the results parameter for GameObject.FindGameObjectsWithTag
- [Android] "Screen.safeArea.y" always returns values outside of the Safe Area when the device is in Portrait orientation
- Frame spike due to many TreeRenderer.TreeUpdated calls when repositioning terrains in large Scenes
- Crash on GameObject::RemoveComponentFromGameObjectInternal when reparenting Text GameObjects
- [IL2CPP-GarbageCollector] Changing GCMode might permanently disable GC in a multithreaded context
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.