Property Painter
- Create new folder and name it
Editor. -
Inside
Editorfolder create new class,ExamplePainter.cspublic class ExamplePainter { } -
Inherit from
PropertyPainterclass.public class ExamplePainter : PropertyPainter { } -
Implement virtual method
OnPainterGUI.public class ExamplePainter : PropertyPainter { public override void OnPainterGUI(Rect originalPosition, Rect painterPosition, SerializedProperty property, GUIContent label) { // Painter GUI here... } } -
Add
PainterTargetattribute and setExampleAttributeas target to this view.[PainterTarget(typeof(ExampleAttribute))] public class ExamplePainter : PropertyPainter { public override void OnPainterGUI(Rect originalPosition, Rect painterPosition, SerializedProperty property, GUIContent label) { // Property GUI here... } }