Property View
- Create new folder and name it
Editor
. -
Inside
Editor
folder create new class,ExampleView.cs
public class ExampleView { }
-
Inherit from
PropertyView
class.public class ExampleView : PropertyView { }
-
Implement abstract method
OnGUI
.public class ExampleView : PropertyView { public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { // Property GUI here... } }
-
Add
ViewTarget
attribute and setExampleAttribute
as target to this view.[ViewTarget(typeof(ExampleAttribute))] public class ExampleView : PropertyView { public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { // Property GUI here... } }