trying to build the Node Editor based on the others.
I wonder if there is a way to find the PropertyDrawer/PropertyEditor from the SerializedObject.
case:
public TestObject : ScriptableObject { ... }
[CustomPropertyDrawer(typeof(TestObject)]
public TestObjectDrawer : PropertyDrawer { ..... }
//----------------------------
during drawing my Node editor canvas, we use GUILayout.Window() for display those TestObject
since those TestObject can be any scriptableObject, I would like to use the Unity CustomPropertyXXX to display the result.
anyone have idea ? (sorry for English)
Welcome to the Dark Side. You’ll need to use Reflection to get the property handler then use Reflection again to get the drawer
Something like this may help:
Check out the “PropertyHandler” class in the UnityEditor namespace if you have DotPeek, lot’s of other useful methods and properties in there. Shame all this stuff is internal, would be very handy.