Class SuperPropertyDrawer
Derive from this class to create a custom property drawer for a property.
public abstract class SuperPropertyDrawer : GUIDrawer
- Inheritance
-
GUIDrawerSuperPropertyDrawer
- Derived
Properties
attribute
Attributes of the property.
public SerializedAttributes attribute { get; }
Property Value
fieldInfo
FieldInfo or PropertyInfo of the property.
public MemberInfo fieldInfo { get; }
Property Value
preferredLabel
Preferred label of the property.
public string preferredLabel { get; }
Property Value
Methods
CreatePropertyGUI(SerializedProperty)
Override this method to make your own UI Toolkit based GUI for the property.
public virtual VisualElement CreatePropertyGUI(SerializedProperty property)
Parameters
property
SerializedPropertyThe SuperSerializedProperty to make the custom GUI for.
Returns
- VisualElement
The element containing the custom GUI.
GetPropertyHeight(SuperSerializedProperty, GUIContent)
Override this method to specify how tall the GUI for this field is in pixels.
public virtual float GetPropertyHeight(SuperSerializedProperty property, GUIContent label)
Parameters
property
SuperSerializedPropertyThe SuperSerializedProperty to get the height for.
label
GUIContentThe label of the property.
Returns
- float
The height of the GUI for this field in pixels.
OnGUI(Rect, SuperSerializedProperty, GUIContent)
Override this method to make your own IMGUI based GUI for the property.
public virtual void OnGUI(Rect position, SuperSerializedProperty property, GUIContent label)
Parameters
position
RectRectangle on the screen to use for the property GUI.
property
SuperSerializedPropertyThe SuperSerializedProperty to make the custom GUI for.
label
GUIContentThe label of the property.