Skip to main content

Class PIDFactorsPropertyDrawer

Custom property drawer for the PIDFactors struct, laying out P, I, and D fields side by side in the Inspector.

[CustomPropertyDrawer(typeof(PIDController<>.PIDFactors))]
public class PIDFactorsPropertyDrawer : PropertyDrawer

Inheritance​

Methods​

GetPropertyHeight(SerializedProperty, GUIContent)​

Override this method to specify how tall the GUI for this field is in pixels.

public override float GetPropertyHeight(SerializedProperty property, GUIContent label)

Parameters​

NameTypeDescription
propertySerializedPropertyThe SerializedProperty to make the custom GUI for.
labelGUIContentThe label of this property.

Returns​

float — The height in pixels.

OnGUI(Rect, SerializedProperty, GUIContent)​

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

public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)

Parameters​

NameTypeDescription
posRect
propSerializedProperty
labelGUIContentThe label of this property.
  • Methods
    • GetPropertyHeight(SerializedProperty, GUIContent)
    • OnGUI(Rect, SerializedProperty, GUIContent)