Is it possible to display custom property drawers inside custom editors ? I’ve been struggling to achieve this result without much luck.
Here’s an oversimplification of my problem:
[Serializable]
public class A
{
public int intValue;
}
[Serializable]
public class B
{
public A instanceOfA;
}
I have a custom editor for class B and a custom drawer for class A and i want to use the custom drawer instead of reimplementing the functionality inside the custom editor.
The custom drawer displays fine inside a class that doesn’t have a custom editor (uses the default inspector), but i can’t seem to be able to “call” it inside my custom editor.
From what i’ve read, custom drawers are called if i use the EditorGUILayout.PropertyField method, but the problem with that is it expects a SerializableProperty and i can’t get a hold of one of those since my classes don’t extend Object.
Any help with this would be greatly appreciated, even if it means letting me know that this isn’t yet possible.
Thank you !