MultiSet
Developer PortalContact UsTutorials
  • MultiSet Developer Docs
  • Getting Started
    • Changelog
    • MultiSet Unity SDK
      • Universal 3D (Core) support
    • FAQ
  • Basics
    • Maps
      • Mapping Instruction
      • Mapping Planning
      • Mapping Equipment
    • MapSet : Multiple Maps
      • Merging Maps without Overlap
        • Extend a MapSet
      • Merging Maps with Overlap
      • Adjust Map Transformation
    • ModelSet: Object Anchoring
      • How to Create a ModelSet
    • App Localization
    • Credentials
    • Analytics and Usage
    • Downloads
    • REST API Docs
    • WebXR Integration
    • Third Party Scans
      • Matterport
      • Leica Scans
    • MapFoundry
    • Georeferencing Maps
      • How to Align Scans
      • Outdoor-Indoor Transitions with Multiset
    • On-Premises Localization
    • Support
  • Unity-SDK
    • Authentication
    • Sample Scenes
      • Localization
      • Single Frame Localization
      • ModelSet Tracking
      • Navigation
      • Training
    • On-Cloud Localization
      • Individual Map
      • MapSet (Multiple maps)
        • Hint MapCodes
      • Pose Prior : HintPosition
      • GeoHint in Localization
    • Occlusion
    • NavMesh Navigation
    • Multiplayer AR
    • Building Steps
    • API Reference
      • MultisetSdkManager
      • MapLocalizationManager
      • SingleFrameLocalizationManager
      • ModelSetTrackingManager
      • MapMeshHandler
      • ToastManager
  • MultiSet-Quest-SDK
    • Installation Guide
    • Map Mesh Downloader
    • Authentication
    • Sample Scenes
      • Single Frame Localization
  • Native Support
    • iOS Native
    • Android Native
  • MultiSet App
    • Content Space
Powered by GitBook
On this page
  1. Unity-SDK
  2. API Reference

SingleFrameLocalizationManager

PreviousMapLocalizationManagerNextModelSetTrackingManager

Last updated 17 days ago

Was this helpful?

CtrlK

Was this helpful?

Single Frame Localization Manager

The SingleFrameLocalizationManager is a specialized component within the MultiSet SDK designed to perform VPS localization using a single camera frame per request. This approach is useful for scenarios where quick, individual localization attempts are preferred over a continuous multi-frame approach. The manager can be configured to make multiple single-frame attempts and select the best result based on confidence scores.

Description

This manager handles the process of capturing a single, high-quality (non-blurry) image from the device's AR camera, sending it to the MultiSet backend for pose estimation, and then aligning the mapSpace GameObject with the real world. It includes features for automatic localization on startup, re-localization upon losing AR tracking, and a confidence-based validation system to ensure the reliability of the localization result. It provides UnityEvent callbacks for developers to respond to key moments in the localization lifecycle.

Properties

This section details the publicly accessible fields of the SingleFrameLocalizationManager that can be configured in the Unity Editor or through script.

Property

Type

Description

localizationType

LocalizationType

An enum specifying whether to localize against a single Map or a MapSet.

mapOrMapsetCode

string

The unique code for the map or map set that the device will attempt to localize against. This is a required field.

autoLocalize

bool

If true, the manager will automatically start the localization process after the SDK has successfully authenticated.

relocalization

bool

If true, the manager will attempt to re-localize automatically if the AR session loses tracking.

confidenceCheck

bool

When enabled, the manager will only consider a localization successful if its confidence score, returned by the API, is above the _confidenceThreshold.

_confidenceThreshold

float

The minimum confidence score required for a localization result to be considered valid when confidenceCheck is enabled. The value is clamped between 0.2 and 0.8.

_requestAttempts

int

The total number of single-frame localization attempts the manager will make in a single LocalizeFrame() cycle. The value is clamped between 1 and 5.

localizationInterval

int

The time in seconds to wait between each localization attempt. The value is clamped between 1 and 5.

showAlert

bool

If true, a toast message will be displayed on the screen indicating whether the final localization result was a success or failure.

passGeoPose

bool

If enabled, the manager will include the device's GPS coordinates in the localization request to serve as a hint for the backend.

geoCoordinatesInResponse

bool

If enabled, the manager will request that the localization response includes the geo-coordinates corresponding to the device's estimated position.

LocalizationInit

UnityEvent

A UnityEvent that is invoked at the beginning of the localization process when LocalizeFrame() is called.

LocalizationSuccess

UnityEvent

A UnityEvent that is invoked after a successful localization attempt that meets the confidence criteria (if enabled), and the mapSpace pose has been updated.

LocalizationFailure

UnityEvent

A UnityEvent that is invoked if all localization attempts fail to produce a valid pose or if the best result does not meet the confidence threshold.


Public Methods

This section describes the publicly accessible methods of the SingleFrameLocalizationManager.

LocalizeFrame()

Manually initiates the single-frame localization process.

public void LocalizeFrame()

Description Calling this method starts the localization sequence. The manager will attempt to capture a non-blurry image and send it to the MultiSet API. It will repeat this process for the number of times specified by _requestAttempts. After all attempts are complete, it evaluates the results to find the best pose. This is the main method to use for triggering localization on demand.