Hello! I have a generic class GenericClass<T>
for which I have a PropertyDrawer. I know that class by itself won’t serialize, but I’m currently deriving from it, and thus, can see the child classes in the inspecot (yay), but that’s not what I’m here to ask about.
I’m very new to PropertyDrawers, but I know you can create a drawer for a generic class by using the following syntax:
[System.Serializable]
public class GenericClass<T>
{
}
[CustomPropertyDrawer(typeof(GenericClass<>), true)]
public class GenericClassDrawer : PropertyDrawer
{
}
My question is: Can I access the generic type itself from the drawer component? For example, if I have a GenericClass<float>
, is there any way for the property drawer to know it’s dealing with a float?
Thanks in advance!