# UTrackedInstance

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

```cpp
UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class AR51SDK_API UTrackedInstance : public UActorComponent
```

**Inherits:** [`UActorComponent`](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/UActorComponent) *(Unreal Engine)*

The per-detection data record. One `UTrackedInstance` is attached to each spawned tracked actor; its owning [`AActor`](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/AActor) is what actually moves in the world. You normally **read** these from [`UObjectDetectionConsumer`](/docs/sdk-api/unreal-api/classes/uobjectdetectionconsumer) rather than create them yourself.

:::caution[Units]
The AR 51 system reports positions in **meters**; the consumer converts spawned actor transforms to Unreal **centimeters** internally. The fields below that are **not** converted — notably `Radius` — remain in **AR 51 meters**. See the per-field note.
:::

## Properties

All `EditAnywhere, BlueprintReadWrite` unless noted.

<div className="apiPropTable">

| Property | Type | Blueprint | Description |
|---|---|---|---|
| **Identity** | | | |
| `Id` | `FString` | `EditAnywhere, BlueprintReadWrite` | Stable tracking id from the feed (underscores are replaced with dashes when used to name spawned actors). Used as the tracking-map key, so it is unique per live instance. |
| `Type` | [`EInstanceType`](#einstancetype) | `EditAnywhere, BlueprintReadWrite` | Whether this is a `Marker` or an `Object`. Set by the consumer at spawn. |
| **Marker appearance** | | | |
| `ColorName` | `FString` | `EditAnywhere, BlueprintReadWrite` | The marker's type/color label as a string (e.g. a color or marker-type name). For markers it is populated from the feed's `type` field and used both for material tint and for [`FMarkerItem`](/docs/sdk-api/unreal-api/object-detection#fmarkeritem) matching. Empty for objects. |
| `Color` | [`FColor`](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Core/FColor) | `EditAnywhere, BlueprintReadWrite` | RGBA color. ⚠️ **Declared but unused:** not assigned anywhere in the consumer `.cpp` — color is applied via `ColorName` parsing instead, so this field may be reserved/unused at present. |
| `Radius` | `float` | `EditAnywhere, BlueprintReadWrite` | Marker radius as reported by the feed. ⚠️ **Units:** applied directly as a scale multiplier (**not** unit-converted), so this is in **AR 51 meters**, not cm. Only meaningful for `Marker` instances. |
| **Tracking state** | | | |
| `Rays` | `TArray<FVector>` | `EditAnywhere, BlueprintReadWrite` | Array of direction/position vectors. ⚠️ **Declared but unused:** never populated by the consumer; likely reserved for camera-ray triangulation data. |
| `LastUpdateTime` | `float` | `EditAnywhere, BlueprintReadWrite` | World time (seconds, `GetWorld()->TimeSeconds`) of the most recent update for this instance. Drives hide/destroy pruning. |
| `AttachedItem` | [`AActor*`](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/AActor) | `Transient` *(not Blueprint-exposed)* | Optional secondary actor spawned from a matching [`FMarkerItem`](/docs/sdk-api/unreal-api/object-detection#fmarkeritem)`.Blueprint` and parented to this marker (e.g. a visual prop). Destroyed with the marker. |

</div>

## Method summary

**Instance**

| Method | Returns | |
|---|---|---|
| [`ToString`](#tostring) | `FString` | <Badge>C++ only</Badge> |

→ Full descriptions in [Method details](#method-details) below.

## Method details

### ToString

<ApiBody kind="method" tags="C++ only">

```cpp
FString ToString() const;
```

Debug string in the form `"<Type>:<Id>@<worldLocation>"`. Plain C++ — **not** a `UFUNCTION`, so it is not Blueprint-callable.

<Returns type="FString">a human-readable `"<Type>:<Id>@<worldLocation>"` summary for logging</Returns>

</ApiBody>

:::note
The constructor `UTrackedInstance()` is empty/default.
:::

## EInstanceType

<Badge tone="type">UENUM (uint8)</Badge> <Badge>BlueprintType</Badge>

```cpp
UENUM(BlueprintType)
enum class EInstanceType : uint8
```

Discriminator for what a `UTrackedInstance` represents — the value carried in its [`Type`](#properties) field.

| Value | DisplayName | Meaning |
|---|---|---|
| `Marker` | "Marker" | A point/sphere marker (id + color + radius, position only). |
| `Object` | "Object" | A full 6-DoF tracked object (position + rotation, matched to a Blueprint prefab). |

## See also

- [`UObjectDetectionConsumer`](/docs/sdk-api/unreal-api/classes/uobjectdetectionconsumer) — the component that spawns, updates, and prunes these records; read them from it
- [`FMarkerItem`](/docs/sdk-api/unreal-api/object-detection#fmarkeritem) — the rule matched against `ColorName` to spawn an `AttachedItem`
- [Object Detection](/docs/sdk-api/unreal-api/object-detection) — area overview and units convention
- [Class index](/docs/sdk-api/unreal-api/classes) — all Unreal SDK types
