Class DatumPropertyDrawer
Base DatumProperty<TValue, TDatum> drawer used to better present the options between constants and ScriptableObject references.
Inherited Members
Namespace: Unity.XR.CoreUtils.Datums.Editor
Syntax
public abstract class DatumPropertyDrawer : PropertyDrawer
Methods
GetPropertyHeight(SerializedProperty, GUIContent)
Calculates the height of the property based on the number of children of the property.
Declaration
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
Parameters
Type | Name | Description |
---|---|---|
SerializedProperty | property | The SerializedProperty to make the custom GUI for. |
GUIContent | label | The label of this property. |
Returns
Type | Description |
---|---|
Single | The height in pixels. |
Overrides
GetSelectedProperty(SerializedProperty)
Gets the property that represents the correct variable reference value.
Declaration
protected SerializedProperty GetSelectedProperty(SerializedProperty property)
Parameters
Type | Name | Description |
---|---|---|
SerializedProperty | property | The SerializedProperty that contains the variable reference values. |
Returns
Type | Description |
---|---|
SerializedProperty | If the VariableReference is set to use a constant value, the constant value will be returned, otherwise the variable value will be returned. |
See Also
OnGUI(Rect, SerializedProperty, GUIContent)
Draws the property using immediate mode.
Declaration
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
Parameters
Type | Name | Description |
---|---|---|
Rect | position | Rectangle on the screen to use for the property GUI. |
SerializedProperty | property | The SerializedProperty to make the custom GUI for. |
GUIContent | label | The label of this property. |