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

Provides methods to perform a non-persistent, live preview of a spatial relationship defined by LemmingRelationshipInfo. Useful for UI remapping scenarios where users adjust settings and need immediate feedback without altering the original ScriptableObject. More...

Data Structures

struct  Result
 Holds the results of a live relationship computation, including raw, normalized, curved values and boundary status flags. More...

Static Public Member Functions

static Result Compute (in LemmingRelationshipInfo info, LemmingRelationSetting settings=null)
 Performs a one-off preview calculation using the supplied info without mutating any underlying ScriptableObject or runtime data.
static Result ComputeMetric< TEnum > (in LemmingRelationshipInfo info, TEnum metric, LemmingRelationSetting settings=null)
 Compute a preview result using a specific metric override.
static Result ComputeMetric< TEnum > (in LemmingRelationshipInfo info, TEnum metric, float? customMin=null, float? customMax=null, LemmingRelationSetting? settings=null)
 Performs a one-off preview computation using a specific metric and optional overrides, without modifying the underlying relationship or asset data.

Detailed Description

Provides methods to perform a non-persistent, live preview of a spatial relationship defined by LemmingRelationshipInfo. Useful for UI remapping scenarios where users adjust settings and need immediate feedback without altering the original ScriptableObject.

Member Function Documentation

◆ Compute()

Result Lemmings.RelationshipPreview.Compute ( in LemmingRelationshipInfo info,
LemmingRelationSetting settings = null )
inlinestatic

Performs a one-off preview calculation using the supplied info without mutating any underlying ScriptableObject or runtime data.

Parameters
infoA snapshot of user-adjustable settings and references captured in a LemmingRelationshipInfo struct.
settingsOptional settings defined by a LemmingRelationSetting struct. if you do not want to use the settings defined by the original relationship
Returns
A Result containing raw, normalized, curved values and status flags (Over/Under/InRange).

◆ ComputeMetric< TEnum >() [1/2]

Result Lemmings.RelationshipPreview.ComputeMetric< TEnum > ( in LemmingRelationshipInfo info,
TEnum metric,
float? customMin = null,
float? customMax = null,
LemmingRelationSetting? settings = null )
inlinestatic

Performs a one-off preview computation using a specific metric and optional overrides, without modifying the underlying relationship or asset data.

Template Parameters
TEnumThe type of metric enum to evaluate (e.g. SingleMetric, CoupleMetric).
Parameters
infoA read-only struct containing snapshot data from a LemmingRelationship. This includes references, family type, curve, and bounds.
metricThe metric to evaluate. This overrides the metric stored in info .
customMinOptional minimum bound for normalization. If null, uses info .Min.
customMaxOptional maximum bound for normalization. If null, uses info .Max.
settingOptional parameter structure that provides evaluation settings such as axis, threshold, etc. See LemmingRelationSetting for more.
Returns
A Result containing the raw value, normalized and curved outputs, and status flags indicating whether the result is over, under, or in range.
Type Constraints
TEnum :Enum 

◆ ComputeMetric< TEnum >() [2/2]

Result Lemmings.RelationshipPreview.ComputeMetric< TEnum > ( in LemmingRelationshipInfo info,
TEnum metric,
LemmingRelationSetting settings = null )
inlinestatic

Compute a preview result using a specific metric override.

Template Parameters
TEnumThe metric enum type (SingleMetric, CoupleMetric, etc.)
Parameters
infoBase relationship info.
metricThe specific metric you want to preview.
Returns
Preview result with raw/normalized/curved/etc.
Type Constraints
TEnum :Enum 

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