Skip to content
Multi-room anchoring

Multi-room anchoring

MultiRoomAnchoring matches one client scan against several pre-registered rooms at once.

Scene setup

  1. Create a GameObject with a MultiRoomAnchoring component.
  2. In the Inspector, populate _rooms, a list where each entry has:
    • Room ID (your own string identifier for the room).
    • Source Root Transform (the root of the scanned MeshFilters for that room).
    • Anchor Transform (optional; defaults to the source root’s own position).
  3. Call BuildBatches() to extract anchor payloads from all rooms (or call Localize(clientPayload) directly: BuildBatches is called automatically if needed).
  4. Assign your client-scan root Transform to the _client field.
  5. Call Localize() with the client scan to run registration against all rooms.

Result

The result is one of:

  • Matched: found in room ID X with this transform.
  • Ambiguous: multiple rooms scored too similarly to pick a winner confidently.
  • NoMatch: no room had enough shared geometry or passed verification.

Each result includes per-room failure reasons (for example “insufficient overlap”, “floor level did not match”) and, on a match, the anchor’s world position in the client’s frame. These strings are deliberately plain-language. No algorithm jargon leaks into them, so they’re safe to surface directly in your own UI.

Next