Reorderable List Attribute breaks rendering with Property-Drawered properties
See original GitHub issueWhile getting rid some old (Apr 21 2019) version of NaughtyAttributes I used in my Gameplay Ingredients package, I stumbled upon a break in the behavior of Reorderable List Attributes.
Reproduced with 2020.1.13f1 / current 2.0.7 (cloned your project to have a boilerplate project that’s vanilla)
Seems that Reorderable List property drawer sends incorrect Rect to custom property drawers
In this image : Range Float is broken in the Reorderable List (no Field) but SomeClass uses default PropertyField correctly
In this Image I created a Custom Property Drawer for SomeClass
fields:
This PropertyField Custom property drawer is just a pass-through for a propertyfield :
using UnityEditor;
[CustomPropertyDrawer(typeof(SomeClass))]
public class SomeClassPropertyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
EditorGUI.PropertyField(position, property);
}
}
While debugging, seems that the Rect being sent has incorrect size (position seems correct but could be confirmed):
I enclosed a repro-case unitypackage, not sure if it’s related to your drawer. Seems that old ReorderableList code did not repro this problem ( at least the one I use in my gameplay-ingredients package which is antique 😃 )
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
I merged the pull request into the v2 branch: f188911da9bd764d6538d3efdfea4f35bc518265
@peeweek Hey. Sorry for the delay dude, I will try to merge it in the upcoming weekend. I’m pretty busy these couple of months. I also have some other issues that I want to address and make a new release.