> For the complete documentation index, see [llms.txt](https://multiset.gitbook.io/multiset/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://multiset.gitbook.io/multiset/unity-sdk/api-reference/modelsettrackingmanager.md).

# ObjectTrackingManager

Object Tracking Manager

The ObjectTrackingManager is a component of the MultiSet SDK that enables the tracking of real-world objects. It works by capturing an image from the device's camera, sending it to the MultiSet backend for analysis against a specified Object, and then aligning a digital objectSpace GameObject to match the position and orientation of the detected object.

#### **Description**

This manager is designed to detect and track specific real-world objects that have been pre-configured in the MultiSet system for Object Tracking. It handles the full lifecycle of object tracking, including automatic tracking initiation, capturing non-blurry images, making API requests, and positioning a corresponding virtual object in the AR scene. It also includes functionality to automatically restart the tracking process if the AR session's tracking quality degrades. A series of UnityEvent callbacks are provided to allow for custom logic to be executed at key points during the tracking process.

## P**roperties**

This section details the publicly accessible fields of the ObjectTrackingManager that you can configure in the Unity Editor or via script.

| Property                | Type       | Description                                                                                                                                                                                                       |
| ----------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| objectCode              | string     | The unique identifier for the Object that you want to track. This code is obtained from the MultiSet developer portal and is required for the manager to function. Can be a single string or an array of strings. |
| autoTracking            | bool       | If set to true, the manager will automatically attempt to start the object tracking process as soon as the SDK is authenticated.                                                                                  |
| restartTracking         | bool       | If enabled, the manager will automatically try to re-track the object if the AR session's tracking state becomes limited or is lost.                                                                              |
| showAlert               | bool       | If true, a simple toast message will be displayed on the screen to provide immediate feedback on the success or failure of an object tracking attempt.                                                            |
| captureDelay            | float      | The delay in seconds before the manager captures a frame for tracking after StartFrameTracking() is called. This can be useful to allow the camera to focus or to wait for user positioning.                      |
| confidenceCheck         | bool       | To enable confidence check on Object Tracking response                                                                                                                                                            |
| \_confidenceThreshold   | float      | Confidence filter value ranging between 0 and 1                                                                                                                                                                   |
| ObjectTrackingInit      | UnityEvent | A UnityEvent that is invoked when the object tracking process is initiated via the StartFrameTracking() method.                                                                                                   |
| ObjectTrackingRequested | UnityEvent | A UnityEvent that is invoked just before the captured image is sent to the MultiSet API for tracking.                                                                                                             |
| ObjectTrackingSuccess   | UnityEvent | A UnityEvent that is invoked when an object is successfully tracked and the pose has been applied to the objectSpace GameObject.                                                                                  |
| ObjectTrackingFailure   | UnityEvent | A UnityEvent that is invoked when the object tracking process fails (e.g., the object was not found in the frame or a network error occurred).                                                                    |

***

#### **Public Methods**

This section describes the publicly accessible methods of the ObjectTrackingManager.

**StartFrameTracking()**

Manually initiates the object tracking process.

```csharp
public void StartFrameTracking()
```

**Description**\
When you call this method, the manager will invoke the ObjectTrackingInit event and then start a coroutine. After the specified captureDelay, it will attempt to capture a frame from the AR camera and begin the tracking request. This is the primary method to call if you have autoTracking disabled and wish to trigger tracking based on a specific event or user action.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://multiset.gitbook.io/multiset/unity-sdk/api-reference/modelsettrackingmanager.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
