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

IMPORTANT: This has not been tested for every SDK and you can expect errors with many SDKs. The goal is to provide a scaffold onto which you can generate project-specific solutions. SDKs update and evolve frequently and in order to prioritize felxibility, we did not want to create narrow dependencies. More...

Data Structures

struct  LemmingTrackingInfo
 Holds all relevant tracking information for a given Lemming. More...
struct  LemmingTrackingReference
 Type-agnostic reference for identifying a tracked body part or joint. Used to unify SDK-specific identifiers. More...

Public Types

enum  TrackingSDK {
  Unknown , ARFoundation , XRToolkit , SteamVR ,
  Meta , XRHands , Ultraleap , ManoMotion ,
  VisionOS
}

Static Public Member Functions

static bool TryResolveJointTransform (Transform root, in LemmingTrackingReference reference, out Transform jointTransform)
 Attempts to resolve the specific joint Transform based on SDK and reference information.
static bool GetTrackingStatus (Lemming lemming, out bool status)
 Evaluates tracking for a Lemming and returns a boolean status.
static void UpdateTrackingInfo (ref LemmingTrackingInfo info)
 Populates a LemmingTrackingInfo struct with the best available target, active SDK, and tracking result.
static bool TryAutoPopulateReference (Transform root, out LemmingTrackingReference reference)
static bool GetSDK (Transform target, out TrackingSDK sdk)
 Attempts to identify the tracking SDK in use on the target object.
static bool GetStatus (TrackingSDK sdk, Transform target, float confidence, out bool status)
 Evaluates whether tracking is currently active for a given SDK and target.
static bool IsConfidenceTracked (float confidence, float threshold=0.2f)
 Fallback confidence check for systems without SDKs.
static bool IsARFoundationTracked (Transform target)
 Returns true if AR Foundation is tracking this object.
static bool IsXRTracked (Transform target)
 Returns true if XR Toolkit input system has valid tracking.
static bool IsSteamVRTracked (Transform target)
 Returns true if SteamVR reports this pose as valid.
static bool IsMetaTracked (Transform target)
 Returns true if Meta hand tracking is enabled.
static bool IsMetaJointTracked (Transform target)
 Returns true if Meta skeleton joints are available and active.
static bool IsXRJointTracked (Transform target)
 Returns true if XR Hands joint is valid and tracked.
static bool IsUltraLeapTracked (Transform target)
 Returns true if Ultraleap provider detects tracked hands.
static bool IsManoMotionTracked (Transform target)
 Returns true if ManoMotion reports tracking.
static bool IsVisionOSTracked (Transform target)
 Placeholder: Returns true if VisionOS is assumed active.

Detailed Description

IMPORTANT: This has not been tested for every SDK and you can expect errors with many SDKs. The goal is to provide a scaffold onto which you can generate project-specific solutions. SDKs update and evolve frequently and in order to prioritize felxibility, we did not want to create narrow dependencies.

Static utility for detecting presence and tracking status of known tracking SDKs. Supports fallback to confidence threshold when no SDK is active. Provides modular methods for retrieving targets, identifying SDKs, and checking joint tracking status.

Member Function Documentation

◆ GetSDK()

bool Lemmings.Utilities.LemmingTrackingStatus.GetSDK ( Transform target,
out TrackingSDK sdk )
inlinestatic

Attempts to identify the tracking SDK in use on the target object.

Parameters
targetThe GameObject's transform to evaluate.
sdkOutputs the SDK that appears to be in use.
Returns
True if a supported SDK was identified.

◆ GetStatus()

bool Lemmings.Utilities.LemmingTrackingStatus.GetStatus ( TrackingSDK sdk,
Transform target,
float confidence,
out bool status )
inlinestatic

Evaluates whether tracking is currently active for a given SDK and target.

Parameters
sdkThe identified SDK.
targetThe transform associated with the tracked object.
confidenceFallback confidence value (e.g. from custom tracking systems).
statusOutputs whether the system is currently tracking.
Returns
True if evaluation was successful.

◆ GetTrackingStatus()

bool Lemmings.Utilities.LemmingTrackingStatus.GetTrackingStatus ( Lemming lemming,
out bool status )
inlinestatic

Evaluates tracking for a Lemming and returns a boolean status.

Parameters
lemmingThe Lemming to evaluate tracking for.
statusReturns true if tracking is currently valid.
Returns
True if the tracking evaluation completed successfully.

◆ TryAutoPopulateReference()

bool Lemmings.Utilities.LemmingTrackingStatus.TryAutoPopulateReference ( Transform root,
out LemmingTrackingReference reference )
inlinestatic

Attempts to automatically populate a LemmingTrackingReference from the given root object. This is a heuristic and works best if a known joint/bone structure exists under the target.

Parameters
rootThe root object to scan for tracking components.
referenceOutputs a populated tracking reference if possible.
Returns
True if a reference could be populated based on discovered SDK and structure.

◆ TryResolveJointTransform()

bool Lemmings.Utilities.LemmingTrackingStatus.TryResolveJointTransform ( Transform root,
in LemmingTrackingReference reference,
out Transform jointTransform )
inlinestatic

Attempts to resolve the specific joint Transform based on SDK and reference information.

Parameters
rootThe root GameObject to search from.
referenceThe reference info identifying the desired joint.
jointTransformOutputs the resolved joint transform, if found.
Returns
True if the joint Transform was successfully located.

◆ UpdateTrackingInfo()

void Lemmings.Utilities.LemmingTrackingStatus.UpdateTrackingInfo ( ref LemmingTrackingInfo info)
inlinestatic

Populates a LemmingTrackingInfo struct with the best available target, active SDK, and tracking result.

Parameters
infoThe tracking info container to be updated.

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