For the complete documentation index, see llms.txt. This page is also available as Markdown.

Single Frame Localization

The Single Frame Localization scene is a fundamental demonstration of how the platform performs localization within a mapped environment. It showcases the essential SDK prefabs, including the MultiSet SDK Manager which handles authentication, and the SingleFrameLocalizationManager which manages the localization process.

This scene uses a single camera frame to localize against the map, ideal for situations where you want a quick response from the localization API (roughly 2 seconds).

Core Components

The scene includes the following key GameObjects:

  • MultisetSdkManager: Handles SDK authentication and initialization.

  • SingleFrameLocalizationManager: Manages the single-frame localization process.

  • MapSpace: Parent GameObject for all AR content anchored to the map.

SingleFrameLocalizationManager Properties

Property
Type
Default
Description

localizationType

LocalizationType

Map

Select whether to localize against a single Map or a MapSet.

mapOrMapsetCode

string

""

The unique code for the map or mapSet to localize against.

queryMode

QueryMode

Vps1

Vps1 (Standard) is faster and suits most maps. Vps2 (Deep Search) searches more broadly for large or repetitive spaces.

autoLocalize

bool

true

If true, localization starts automatically after SDK authentication.

backgroundLocalization

bool

true

When enabled, the manager periodically re-localizes in the background to maintain positioning accuracy.

bgLocalizationDuration

float

60

Time interval in seconds between background localization attempts. Valid range: 15–180 seconds.

confidenceCheck

bool

false

When enabled, a result is accepted only if its confidence score exceeds the threshold.

_confidenceThreshold

float

0.3

Minimum confidence score required for a result to be valid when confidenceCheck is on. Valid range: 0.2–0.8.

showAlert

bool

true

If true, a toast message is displayed on success or failure.

firstLocalizationUntilSuccess

bool

true

When enabled, the first localization request retries silently until it succeeds without showing failure messages.

Localization hints (hintMapCodes, hintPosition, hintFloorHeight, hintRadius, use2DFiltering) can narrow the search further. These are set from script rather than the Inspector. See the SingleFrameLocalizationManager reference for details.

Localization Callbacks

Callback
Description

LocalizationInit

Invoked when the localization process is initiated by calling LocalizeFrame().

LocalizationRequested

Invoked just before the captured frame is sent to the MultiSet API.

LocalizationSuccess

Invoked when the device has been successfully localized and the pose is applied.

LocalizationFailure

Invoked when the localization process fails (e.g., no pose found, network error).

Public Methods

LocalizeFrame()

Manually starts the single-frame localization process.

Calling this method captures one frame from the Quest passthrough camera and sends it to the MultiSet backend for pose estimation. Use this if autoLocalize is disabled and you want to trigger localization manually. If a localization is already in progress, the call is ignored.

Setup

  1. Open the SingleFrameLocalization scene from the imported samples.

  2. Select the MultisetSdkManager GameObject and configure your API credentials.

  3. Select the SingleFrameLocalizationManager component and enter your Map Code or MapSet Code.

  4. Add any AR content you want anchored to the map under the MapSpace GameObject.

  5. Build and deploy to your Meta Quest device.

For the full property and method list, see the SingleFrameLocalizationManager API reference.

Last updated

Was this helpful?