# Service components

<Badge tone="type">UCLASS · UActorComponent</Badge> <Badge>BlueprintSpawnableComponent</Badge> <Badge>singleton</Badge>

These are the **device-side gRPC service endpoints** hosted by the SDK actor. The AR 51 connection model is **inverted** relative to a typical client SDK: your Unreal app runs a set of gRPC **servers** (these components) and *registers itself* with OMS. OMS/CVS then call **into** these services — so most of each component's methods are server-side handlers, not an API you call from Blueprint or C++.

You enable a service simply by adding its component to the [`AAR51SDK`](/docs/sdk-api/unreal-api/classes/aar51sdk) actor; `AAR51SDK` stands the full set up on its `ServicesPort` at `BeginPlay`. What remains caller-facing is small: a couple of lifecycle **events**, one **singleton accessor** per component, and one allow-list **property** on the engine service. Everything else is documented as internal below.

This page covers the service components that have *any* caller-facing surface plus the four pure endpoints. The spatial-anchor service, which has a substantial public API of its own, has its own page: [`UAnchorServiceComponent`](/docs/sdk-api/unreal-api/classes/uanchorservicecomponent).

:::caution[Units & space]
Unreal world units are **centimeters** and rotations **degrees**; AR 51 mocap/CVS data arrives in **meters** (and a different coordinate convention). Any transform crossing a service boundary is converted by the SDK. To convert yourself, use the helpers on [`UAnchorServiceComponent`](/docs/sdk-api/unreal-api/classes/uanchorservicecomponent) (`AR51SDKToWorldSpace` / `WorldToAR51SDKSpace`).
:::

## UHandSkeletonServiceComponent

<Badge tone="type">UCLASS · UActorComponent</Badge> <Badge>BlueprintSpawnableComponent</Badge> <Badge>singleton</Badge>

```cpp
UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class AR51SDK_API UHandSkeletonServiceComponent : public UActorComponent, public ISingleton<UHandSkeletonServiceComponent>
```

**Inherits:** [`UActorComponent`](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/UActorComponent) *(Unreal Engine)* · [`ISingleton<UHandSkeletonServiceComponent>`](/docs/sdk-api/unreal-api/utilities-platform#isingletont)

Hosts the **hand-tracking skeleton stream** service. Add it to the SDK actor to enable hand tracking. The per-frame hand pose data is delivered through the streaming service itself (consumed elsewhere in the SDK), not via a Blueprint getter on this component — so the caller-facing surface is the start/stop lifecycle events plus the singleton accessor.

**Events** — `UPROPERTY(BlueprintAssignable, Category="Events")`, no-param dynamic multicast.

| Event | Signature | Fires when |
|---|---|---|
| `OnHandStreamStarted` | `FOnHandStreamStarted()` | the hand-tracking stream begins |
| `OnHandStreamStopped` | `FOnHandStreamStarted()` | the hand-tracking stream ends |

:::caution[⚠️ delegate-type inconsistency]
`OnHandStreamStopped` is declared with delegate type `FOnHandStreamStarted` even though an `FOnHandStreamStopped` type exists. Harmless (both are no-param) but inconsistent — verify before relying on the exact delegate type in C++ binding code.
:::

<ApiBody kind="method" tags="static, BlueprintCallable" id="gethandskeletonservicesingleton">

```cpp
static UHandSkeletonServiceComponent* GetHandSkeletonServiceSingleton();
```

The live hand-skeleton service instance — the way to reach it from anywhere to bind the stream events.

<Returns type="UHandSkeletonServiceComponent*">the singleton, or `nullptr` if none is in the level</Returns>

<Example inferred>

```cpp
if (auto* Hands = UHandSkeletonServiceComponent::GetHandSkeletonServiceSingleton())
{
    Hands->OnHandStreamStarted.AddDynamic(this, &AMyManager::HandleHandStreamStarted);
    Hands->OnHandStreamStopped.AddDynamic(this, &AMyManager::HandleHandStreamStopped);
}
```

</Example>

</ApiBody>

:::note[Internal — not documented]
Server-side gRPC stream handler, not part of the caller-facing API: `StartStreaming(grpc::ServerContext*, const AR51::Empty*, grpc::ServerWriter<AR51::TwoHandsInfoResponse>*)`.
:::

## UEngineServiceComponent

<Badge tone="type">UCLASS · UActorComponent</Badge> <Badge>BlueprintSpawnableComponent</Badge> <Badge>singleton</Badge>

```cpp
UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class AR51SDK_API UEngineServiceComponent : public UActorComponent, public ISingleton<UEngineServiceComponent>
```

**Inherits:** [`UActorComponent`](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/UActorComponent) *(Unreal Engine)* · [`ISingleton<UEngineServiceComponent>`](/docs/sdk-api/unreal-api/utilities-platform#isingletont)

Hosts the **engine / scene-control** service — the remote interface OMS/CVS uses to instantiate, transform, parent, name, activate, and re-material actors in the Unreal scene. All of those operations are remote gRPC calls; the one thing you configure from Unreal is the allow-list of Blueprints OMS is permitted to spawn.

**Properties** — `EditAnywhere, BlueprintReadWrite`.

<div className="apiPropTable">

| Property | Type | Default | Description |
|---|---|---|---|
| **General** | | | |
| `InstanceBlueprints` | `TArray<TSubclassOf<AActor>>` | — | the set of actor Blueprints OMS is allowed to instantiate (by index/name) through the service |

</div>

Populate `InstanceBlueprints` in the Details panel with the actor classes you want OMS to be able to spawn and manipulate remotely; the service can only instantiate classes present in this list.

:::note[Internal — not documented]
All scene operations are server-side gRPC handlers driven by OMS/CVS, not a Blueprint API you call yourself: `GetPyTime`, `GetPyTimeOffset`, `SetPyTimeOffset`, `Instantiate`, `FindGameObject`, `FindAnchorGameObject`, `GetMainCamera`, `Destroy`, `CreatePrimitive`, `NewGameObject`, `ClearInstances`, `SetParent`, `GetName`, `SetName`, `GetActive`, `SetActive`, `GetTransform`, `SetTransform`, `StreamTransform`, `GetComponent`, `GetComponentField`, `SetComponentField`, `SetCameraProject`, `SetRendererEnabled`, `SetMaterialTexture`, `SetMaterialInt32`, `SetMaterialFloat`, `SetMaterialColor`, `GetMaterialColor`; plus the gRPC/proto wire types they use.
:::

## Pure service endpoints

These four components are **service endpoints only** — each exposes the same `Get…Singleton()` accessor pattern through `ISingleton`, but has **no Blueprint-exposed properties, events, or callable functions** in its header (constructor + `BeginPlay` / `TickComponent` overrides only). You add them to the SDK actor so OMS can reach the corresponding service; you do not call them from your game code.

| Component | Service hosted | Caller-facing Blueprint API |
|---|---|---|
| `UCameraServiceComponent` | camera control / streaming (`AR51::CameraService`) | none ⚠️ |
| `UDrawServiceComponent` | scene draw / debug-draw commands (`AR51::DrawService`) | none |
| `UGameServiceComponent` | game-control hooks (`AR51::GameService`) | none |
| `URenderServiceComponent` | render control / streaming (`AR51::RenderService`) | none |

All four are `UCLASS · UActorComponent` (`BlueprintSpawnableComponent`) and `ISingleton<…>`.

:::caution[⚠️ camera developer API]
`UCameraServiceComponent` has no caller-facing API on the component itself. Any camera-facing developer API likely lives elsewhere (e.g. the engine service or a camera adapter), not here — confirm before assuming this component is the entry point for camera control.
:::

## See also

- [`AAR51SDK`](/docs/sdk-api/unreal-api/classes/aar51sdk) — the connection entry-point actor that hosts every service component
- [`UAnchorServiceComponent`](/docs/sdk-api/unreal-api/classes/uanchorservicecomponent) — the spatial-anchor / boundary service (its own public API, including the space-conversion helpers)
- [`USkeletonConsumer`](/docs/sdk-api/unreal-api/classes/skeletonconsumer) — the skeleton-stream consumer (the main mocap entry point)
- [`EPlatformTypes`](/docs/sdk-api/unreal-api/utilities-platform#eplatformtypes) — device/platform class reported at registration
- [Class index](/docs/sdk-api/unreal-api/classes) — all Unreal SDK types
