Skip to content

BaseScriptableDrawer Class

C#
public abstract class BaseScriptableDrawer : PropertyDrawer

Inheritance object → UnityEditor.GUIDrawer → UnityEditor.PropertyDrawer

OnGUI(Rect, SerializedProperty, GUIContent)

Section titled “OnGUI(Rect, SerializedProperty, GUIContent)”

Override this method to make your own IMGUI based GUI for the property.

C#
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)

position UnityEngine.Rect
Rectangle on the screen to use for the property GUI.

property UnityEditor.SerializedProperty
The SerializedProperty to make the custom GUI for.

label UnityEngine.GUIContent
The label of this property.

Creates custom GUI with UI Toolkit for the property.

C#
public override VisualElement CreatePropertyGUI(SerializedProperty property)

property UnityEditor.SerializedProperty
The SerializedProperty to make the custom GUI for.

UnityEngine.UIElements.VisualElement

The element containing the custom GUI.

C#
protected abstract Type[] GetTypes()

Type[]