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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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.