Search Issue Tracker

Fixed in 2019.3.X

Fixed in 2019.2.X

Votes

0

Found in

2019.2

2019.2.0b3

Issue ID

1156837

Regression

Yes

CustomPropertyDrawers have different behavior now in 2019.2

Themes

-

CustomPropertyDrawers have different behavior now in 2019.2

1. What happened
Previously, a List<Something> where there is a CustomPropertyDrawer(typeof(Something)) would properly draw if a call was made to the list, such as:
EditorGUILayout.PropertyField(somethingListProperty, true);

Each individual element in the list would be called with the CustomPropertyDrawer. Now, the whole list is being passed to the CustomPropertyDrawer.
This is a regression.

2. How we can reproduce it using the example you attached
i. Open the project and double click on the WorkaholicDomain asset in the main Assets/ directory.
ii. Click on the Workstation trait

Notice the NullRefExceptions; This occurs because the TraitDefinitionFieldDrawer is no longer getting the element, but the whole array.
TraitDefinitionDrawer is where the call comes from, which is itself a CustomPropertyDrawer.

This functionality works correctly on 2019.1 where it was developed, but you won't be able to convert back to that version easily without fixing up the manifest.json and resolving conflicts. If you'd like to test in 2019.1, then I can provide another project as well.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.