Skip to content
AR Foundation sample

AR Foundation sample

The AR Foundation Anchor sample shows a complete mobile app flow, live on device.

The flow

Scan

Use ARKit’s scene reconstruction to capture the room mesh live.

Place

Tap to position an anchor in your scan.

Save

Create the anchor payload and export it (as text or file).

Share

Send the payload to another device however you prefer.

Find

Import the payload, scan the same room on the other device, and run registration to lock the anchor.

What the sample handles

  • ARKit/ARFoundation integration (scene mesh + placement UI).
  • Payload serialization (binary format, compact and stable across versions).
  • License state checking at runtime (LicenseInfo.Resolve()).
  • Real-time diagnostics (feature counts, overlap %, RMSE (root-mean-square error, how far the fit is off), confidence).

Running it

  1. Install the main bridge package: com.lansenou.unitybridge (see Install).
  2. Import the AR Foundation Anchor sample (Package Manager > LansAnchor > Samples).
  3. Open the ARFoundationAnchor scene.
  4. Build to an iPhone with LiDAR (A14 or later, or any iPhone 15+).
  5. Tap to scan, place, save, and export your anchor.

Next