You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GenericPropertyDrawer cannot detect both the built-in property drawer and a user-written property drawer of a serializable type (a class with the [Serializable] attribute), and displays "No PropertyDrawer for type..." when drawn in a collection editor.
From what I can tell in the code, the built-in property drawer is not detected because serializable types are not considered as having it, and no custom property drawer is detected because only property drawers in the ScriptableObject-Architecture.Editor assembly are checked.
Sorry for the long wait, I completely forgot to respond 😬
It works as expected on my end
[System.Serializable]
public class TestClass
{
[SerializeField]
private float testValue;
}
[CustomPropertyDrawer(typeof(TestClass))]
public class TestClassPropertyDrawer : PropertyDrawer
{
public override void OnGUI(Rect propertyRect, SerializedProperty property, GUIContent label)
{
EditorGUI.LabelField(propertyRect, "TEST");
}
}
It's by-design that it can't draw the default inspector for your class, I can't recall why that is, it's been a while since I touched that bit of code, but it was probably too troublesome to support it while also handling all the other features the GenericPropertyDrawer contains.
Custom property drawers would only work if it was placed in the ScriptableObject-Architecture.Editor assembly though. For folks like me who use SO-A as a package in the package manager, we would not be able to put our custom property drawers among the read-only package files to make it visible to the GenericPropertyDrawer code.
Fixed in Release 1.6.2. It will now look at both the default editor assembly and also every assembly definition assembly, regardless of how it's imported
It's also been pushed to releases/stable
GenericPropertyDrawer
cannot detect both the built-in property drawer and a user-written property drawer of a serializable type (a class with the [Serializable] attribute), and displays "No PropertyDrawer for type..." when drawn in a collection editor.From what I can tell in the code, the built-in property drawer is not detected because serializable types are not considered as having it, and no custom property drawer is detected because only property drawers in the
ScriptableObject-Architecture.Editor
assembly are checked.May be related to #7 and commit
a31f77a
.The text was updated successfully, but these errors were encountered: