- Home /
Question by
Firedan1176 · Jul 29, 2015 at 03:24 PM ·
custom editorcustom-inspectorpropertydrawer
Property Drawer inside Custom Editor?
I've made a custom inspector for a script I've made, and it's organized it how I want. Now what I want is a property drawer in it, but how can I do that with my custom inspector?
Comment
Best Answer
Answer by jmorhart · Jul 30, 2015 at 12:12 AM
Custom inspectors will draw custom property drawers if you use the SerializedObject class.
// "yourPropertyName" is the name of a property which has a custom property drawer
// implemented for its class type
EditorGUILayout.PropertyField(serializedObject.FindProperty("yourPropertyName"));
Your answer
Follow this Question
Related Questions
Why is my propertydrawer being automatically disabled? 1 Answer
SerializedObject.FindProperty returning null 2 Answers
Custom Editor/Custom Property Drawer combo, breaks Enable button 1 Answer
How do I hide elements from a child class embedded in a List on the Inspector in the CustomEditor? 0 Answers