Lemmings
Remappable Gestures For Unity
Loading...
Searching...
No Matches
LemmingMetricSettingsDrawer Class Reference

Draws inspector UI for settings relevant to each Lemming metric. Settings shown depend on the metric and family type. More...

Static Public Member Functions

static void DrawSecondaryMetricSettings (SerializedObject serializedObject, LemmingSecondaryMetric secondary, SerializedProperty settings)
 Draw Metric settings option for Secondary Metrics.
static void DrawMetricSettings (SerializedObject serializedObject, LemmingRelationship relationship, SerializedProperty settings=null)
 Drawing Method for Settings in Shepherd and other areas that write back to the original relationship.
static void DrawAdvancedFoldout (System.Action drawAction)
 Draws a foldout labeled "Advanced Settings" and executes the drawAction if it's expanded.
static void ClearAllSettings (SerializedProperty setting)
 Clears all known property types from a serialized setting container. This is used when resetting or switching active metric options.
static void DrawMetricSetting (MetricSettingInfo setting)
 Draws a user-facing field for a given metric setting depending on its defined control type.
static void DrawSettingsSinglePosition (SerializedProperty setting)
 Draws settings for the SinglePosition metric. Optionally enables axis isolation if toggled.
static void DrawSettingsSingleRotation (SerializedProperty setting)
 Draws settings for the SingleRotation metric. Uses proxy and threshold if 'useGazeFromProxy' is enabled.
static void DrawSettingsSingleMovement (SerializedProperty setting)
 Draws settings for SingleMovement metric. Supports relative targeting and axis filtering.
static void DrawSettingsSingleTrigger (SerializedProperty setting)
 Draws settings for SingleTrigger metric. Uses a proxy object reference.
static void DrawSettingsCouplePosition (SerializedProperty setting)
 Draws settings for CouplePosition metric. Adds axis selection if single-axis mode is active.
static void DrawSettingsCoupleRotation (SerializedProperty setting)
 Draws settings for CoupleRotation metric. Adds support for custom or object-centered axis and inversion toggle.
static void DrawSettingsCoupleMovement (SerializedProperty setting)
 Draws settings for CoupleMovement metric. Supports relative-to-object, directional filtering, and axis selection.
static void DrawSettingsCoupleTrigger (SerializedProperty setting)
 Draws settings for CoupleTrigger metric. Uses proxy reference.
static void DrawSettingsCoupleDistance (SerializedProperty setting)
 Draws settings for CoupleDistance metric. Allows distance unit configuration.
static void DrawSettingsCoupleDifference (SerializedProperty setting)
 Draws settings for CoupleDifference metric. Supports axis filtering toggle and enum selection.
static void DrawSettingsThrouplePosition (SerializedProperty setting)
 Draws settings for ThrouplePosition metric. Optionally enables axis selection if toggled.
static void DrawSettingsThroupleRotation (SerializedProperty setting)
 Draws settings for ThroupleRotation metric. Includes selection of axis mode and optional inversion.
static void DrawSettingsThroupleMovement (SerializedProperty setting)
 Draws settings for ThroupleMovement metric. Allows for relative reference, direction filtering, and axis control.
static void DrawSettingsThroupleTrigger (SerializedProperty setting)
 Draws settings for ThroupleTrigger metric. Uses proxy object selection.
static void DrawSettingsThroupleDistance (SerializedProperty setting)
 Draws settings for ThroupleDistance metric. Includes distance mode and unit selectors.
static void DrawSettingsThroupleRotationAroundAxis (SerializedProperty setting)
 Draws settings for ThroupleRotationAroundAxis metric. Combines axis definition and inversion control.
static void DrawSettingsThroupleDensity (SerializedProperty setting)
 Draws settings for ThroupleDensity metric. Supports distance unit and density method selection.
static void DrawSettingsThroupleAngle (SerializedProperty setting)
 Draws settings for ThroupleAngle metric. Optionally includes axis filtering.
static void DrawSettingsThroupleSize (SerializedProperty setting)
 Draws settings for ThroupleSize metric. Includes measurement method and axis filtering.
static void DrawSettingsGroupPosition (SerializedProperty setting)
 Draws settings for GroupPosition metric. Allows filtering to a single axis if enabled.
static void DrawSettingsGroupRotation (SerializedProperty setting)
 Draws settings for GroupRotation metric. Includes a single 'invert' toggle only.
static void DrawSettingsGroupMovement (SerializedProperty setting)
 Draws settings for GroupMovement metric. Supports relative reference object, direction/magnitude toggles, and axis filtering.
static void DrawSettingsGroupTrigger (SerializedProperty setting)
 Draws settings for GroupTrigger metric. Assigns a proxy object for interaction checks.
static void DrawSettingsGroupRotationAroundAxis (SerializedProperty setting)
 Draws settings for GroupRotationAroundAxis metric. Supports custom axis vector, object-centered axis, and inversion toggle.
static void DrawSettingsGroupDensity (SerializedProperty setting)
 Draws settings for GroupDensity metric. Allows selection of measurement method and distance unit.
static void DrawSettingsGroupSize (SerializedProperty setting)
 Draws settings for GroupSize metric. Supports sizing method choice and optional axis filtering.
static SerializedProperty FindSafe (SerializedProperty parent, string name)
 Safe lookup for a child property by name. Returns null if the parent is null.
static void DrawBoolField (SerializedProperty parent, string name)
 Draws a toggle field with label and description.
static void DrawEnumField (SerializedProperty parent, string name)
 Draws an enum popup with hover text from description registry.
static void DrawFloatField (SerializedProperty parent, string name)
 Draws a float input field with label and tooltip.
static void DrawVector3Field (SerializedProperty parent, string name)
 Draws a Vector3 input field with label and help text.
static void DrawObjectField (SerializedProperty parent, string name)
 Draws a Unity object reference selector.

Static Private Attributes

static bool showAdvancedSettings = false

Detailed Description

Draws inspector UI for settings relevant to each Lemming metric. Settings shown depend on the metric and family type.

Member Function Documentation

◆ ClearAllSettings()

void LemmingMetricSettingsDrawer.ClearAllSettings ( SerializedProperty setting)
inlinestatic

Clears all known property types from a serialized setting container. This is used when resetting or switching active metric options.

Parameters
settingSerializedProperty representing the settings object.

◆ DrawAdvancedFoldout()

void LemmingMetricSettingsDrawer.DrawAdvancedFoldout ( System.Action drawAction)
inlinestatic

Draws a foldout labeled "Advanced Settings" and executes the drawAction if it's expanded.

Parameters
drawActionCallback for drawing advanced UI content.

◆ DrawMetricSetting()

void LemmingMetricSettingsDrawer.DrawMetricSetting ( MetricSettingInfo setting)
inlinestatic

Draws a user-facing field for a given metric setting depending on its defined control type.

Parameters
settingThe setting definition and value.

◆ DrawMetricSettings()

void LemmingMetricSettingsDrawer.DrawMetricSettings ( SerializedObject serializedObject,
LemmingRelationship relationship,
SerializedProperty settings = null )
inlinestatic

Drawing Method for Settings in Shepherd and other areas that write back to the original relationship.

Parameters
serializedObject
relationship
settings

◆ DrawSecondaryMetricSettings()

void LemmingMetricSettingsDrawer.DrawSecondaryMetricSettings ( SerializedObject serializedObject,
LemmingSecondaryMetric secondary,
SerializedProperty settings )
inlinestatic

Draw Metric settings option for Secondary Metrics.

Parameters
serializedObjectThe Object being editted
secondarySecondary Metric Class
settingsThe Serialized Setting reference

◆ FindSafe()

SerializedProperty LemmingMetricSettingsDrawer.FindSafe ( SerializedProperty parent,
string name )
inlinestatic

Safe lookup for a child property by name. Returns null if the parent is null.

Parameters
parentParent property.
nameRelative property name.

The documentation for this class was generated from the following file:
  • Assets/Lemmings/Scripts/Editor/LemmingEditorUtilities.cs