On-Device Localization

On-Device Localization allows your application to determine its position and orientation using the processing power of the device itself, without sending image data to the cloud. By downloading map data and caching it locally, the device performs all localization processing internally.

Overview & Use Cases

Unlike Cloud Localization, which relies on a network request to resolve Pose, On-Device Localization offers a self-contained solution. However, because high-fidelity 3D maps contain significant data, this method requires balancing storage usage against network independence.

Benefits

  • Zero Network Latency: Eliminates uncertainty caused by fluctuating network speeds.

  • Offline Capability: ideal for environments with no internet access (e.g., underground mines, remote industrial sites, high-security facilities).

  • Privacy & Security: Camera frames are processed locally and never leave the device.

Considerations

  • Storage Impact: Offline map bundles can range in the 100s of MBs. This significantly increases the application size or the storage footprint on the user's device.

  • Hardware Dependency: Response time relies entirely on the device's hardware.

    • High-end devices (e.g., latest iPhone/iPad): ~3-4 seconds.

    • Older devices: May experience slightly longer processing times.

This solution is ideal for: Restricted environments, enterprise applications where app size is not a constraint, or scenarios where map data changes infrequently.

Prerequisites

  • Enterprise Plan: On-Device Localization is an Enterprise-only feature. Please contact support to enable this on your account.

  • On-Device Unity Module: This feature requires a separate Unity module containing additional binary libraries. Ensure this package is installed in your project alongside the standard MultiSet Unity SDK.

Setup Guide

Step 1: Request Offline Bundle Processing

Before Unity can utilize a map offline, the map data must be compiled into a specialized bundle format.

  1. Log in to the MultiSet Developer Portal.

  2. Navigate to your Map or MapSet.

  3. Click Offline Map and click on Request Processing

  4. The system will begin compiling the data. This typically takes 5–15 minutes depending on the map size.

  5. You will receive an email notification when processing is complete.

Once finished, the portal will generate two files:

  • Offline Bundle (.bytes): The raw map data.

  • Metadata File: Configuration data required by the SDK.

Note: You do not necessarily need to download these files manually, Unity SDK will configure these files in the Editor or in Runtime

Step 2: Unity Configuration

In your Unity Project, open the scene where you wish to enable localization.

  1. Locate or open the OnDeviceLocalization scene.

  2. Select OnDeviceLocalization manager component.

  3. Set the Localization Type to Map (or MapSet depending on your use case).

Step 3: Bundle Management Modes

You must decide how the device retrieves the heavy map data. This is controlled via the Offline Bundle Download Mode setting.

Option A: Editor Mode (Embedded)

The map bundle is downloaded inside the Unity Editor and built directly into the application (.apk/.ipa).

  • Pros: Instant localization upon first launch; no runtime download needed.

  • Cons: drastically increases the initial app download size.

  • Workflow: Select Editor mode. The SDK will allow you to import the downloaded bundle files into your StreamingAssets or designated resource folder.

Option B: Runtime Mode (On-Demand)

The application is built without the map data. The SDK downloads the bundle from the MultiSet servers during the first run.

  • Pros: Keeps the initial app install size small.

  • Cons: Users must wait for the download to complete before the first localization can occur.

  • Workflow: Select Runtime mode. The SDK handles the downloading and caching automatically.

Caching: In both modes, files are cached locally on the device. Once the map is on the device, it does not need to be downloaded again unless the map is updated.

Licensing & First Run

While the primary goal is "Offline" usage, there is a one-time requirement for internet connectivity.

Important: On the very first launch of the application (or the first time the On-Device module is initialized), the device requires an active internet connection to authenticate the Enterprise License.

  • First Run: Internet Required (License check + Bundle download if using Runtime mode).

  • Subsequent Runs: No Internet Required. The license token is cached locally.

Performance Tuning

The Localization Interval or Duration sliders in the Inspector control how frequently the device attempts to resolve its Pose.

  • Since calculations are CPU/GPU intensive, setting this too aggressively may drain battery life.

  • A gap of 20–40 seconds is recommended for most walking navigation scenarios.

Last updated

Was this helpful?