Class DatumPropertyDrawer
Base Datum
Inherited Members
Namespace: Unity.XR.CoreUtils .Datums.Editor
Assembly: Unity.XR.CoreUtils.Editor.dll
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 |
---|---|---|
Serialized |
property | The SerializedProperty to make the custom GUI for. |
GUIContent | label | The label of this property. |
Returns
Type | Description |
---|---|
float | The height in pixels. |
Overrides
See Also
GetSelectedProperty(SerializedProperty)
Gets the property that represents the correct variable reference value.
Declaration
protected SerializedProperty GetSelectedProperty(SerializedProperty property)
Parameters
Type | Name | Description |
---|---|---|
Serialized |
property | The SerializedProperty that contains the variable reference values. |
Returns
Type | Description |
---|---|
Serialized |
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. |
Serialized |
property | The SerializedProperty to make the custom GUI for. |
GUIContent | label | The label of this property. |