HandSkeletonService
public sealed class HandSkeletonService : Singleton<HandSkeletonService>, IHandSkeletonService
Namespace: AR51.Unity.SDK
Streams this device's tracked hand joints — positions, rotations, and confidence — sourced from the active hands adapter. Drop it on a scene object (it's a Unity component and a singleton); call StartStreaming(), then consume GetStream() for per-frame two-hand info.
Joint positions are world-space meters, transformed by OverrideWorldToLocalMatrix before output (identity by default — no transform).
GetStream() yields TwoHandsInfoResponse / HandInfoResponse, which are transport (proto) types. Don't bind UI or gameplay to them directly — read joints through the documented hands adapters, which expose the same data as idiomatic Unity types. See also hand data.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| Streaming | |||
IsStreaming | bool | false | true while the hand stream is live (get-only) |
| Transform | |||
OverrideWorldToLocalMatrix | Matrix4x4 | identity | applied to all hand joints before output |
Method summary
Instance
| Method | Returns | |
|---|---|---|
StartStreaming | void | Unity component |
StopStreaming | void | Unity component |
GetStream | BlockingCollection<TwoHandsInfoResponse> | Unity component |
→ Full descriptions in Method details below.
Method details
StartStreaming
public void StartStreaming();
Begins streaming this device's tracked hand joints from the active hands adapter. After this returns, IsStreaming is true and frames start flowing into the collection from GetStream(). Call once (e.g. on Start/OnEnable).
StopStreaming
public void StopStreaming();
Stops the hand stream and sets IsStreaming back to false. Call when you no longer need hand data (e.g. on OnDisable).
GetStream
public BlockingCollection<TwoHandsInfoResponse> GetStream();
The per-frame two-hand info stream. Consume it on a background thread (or drain it from a coroutine) — BlockingCollection<T> blocks the caller until an item is available. Each TwoHandsInfoResponse carries both hands' joints in world-space meters, already transformed by OverrideWorldToLocalMatrix.
⚠️ TwoHandsInfoResponse / HandInfoResponse are transport (proto) types. Read joints through the hands adapters rather than binding to these directly.
var hands = HandSkeletonService.Instance;
hands.StartStreaming();
// On a worker thread — GetStream() blocks until a frame is ready:
foreach (var frame in hands.GetStream().GetConsumingEnumerable())
{
// Prefer the hands adapters over reading the transport type directly.
// Joint positions are world-space meters.
}
See also
- Hands adapters — the documented, idiomatic way to read the streamed joints
- Hand data — the hand/joint data model
ServiceManager— connection and service entry point- Hands, controllers & boundary — area overview
- Class index — all Unity SDK types