Windows¶
XRTracker on Windows supports the full range of image sources, making it the primary platform for desktop development and testing.
Supported Image Sources¶
| Mode | Description | Depth |
|---|---|---|
| Native | C++ OpenCV capture from connected USB/built-in cameras | No |
| RealSense | Intel RealSense depth cameras (D415, D435, D455, L515) | Yes |
| Sequence | Recorded frame playback from disk | Optional |
Tip
Use Native mode for rapid iteration during development. Switch to Injected mode only when testing AR Foundation workflows via Unity Remote or building for mobile.
Build Settings¶
| Setting | Value |
|---|---|
| Architecture | x86_64 |
| Scripting Backend | IL2CPP or Mono |
| Native Library | m3t_unity_wrapper.dll (loaded automatically) |
Both IL2CPP and Mono scripting backends are supported. IL2CPP provides better runtime performance but longer build times.
Native Mode Setup¶
Native mode uses the C++ backend to capture directly from connected cameras via OpenCV. No additional SDKs are required.
- Set Image Source to
Nativeon the XRTrackerManager component - Press Play -- the tracker opens the first available camera
Camera Selection¶
If multiple cameras are connected, use the Auto Select Camera Name field to specify which camera to use by name (partial match). Enable Auto Select Fallback To First to fall back to the first available camera if the named camera is not found.
Camera Calibration¶
For best tracking accuracy, provide a calibration file with your camera's intrinsics.
- Place your calibration JSON file in
Assets/StreamingAssets/ - Assign the filename in the Calibrations File field on XRTrackerManager
The calibration file contains focal length and principal point for each camera. If no calibration file is provided, intrinsics are estimated from the camera's reported field of view -- this works but is less accurate.
Warning
Estimated intrinsics from the camera's FOV report can be significantly off on some webcams. If tracking quality is poor or the augmentation appears to "slide" on the object, provide a proper calibration file.
RealSense Setup¶
RealSense mode provides synchronized color and depth streams from Intel RealSense cameras.
Prerequisites:
- Intel RealSense SDK 2.0 installed on the system
- RealSense camera connected via USB 3.0
Setup:
- Set Image Source to
RealSenseon XRTrackerManager - Select your preferred color and depth resolutions
- Enable Depth Tracking on each
TrackedBodythat should use depth
Note
Camera intrinsics are read directly from the RealSense firmware -- no calibration file is needed.
Sequence Mode¶
Plays back recorded frame sequences for offline testing. See the Recording & Playback guide for details on creating recordings.
- Set Image Source to
Sequence - Set the Sequence Directory to the folder containing
sequence.json
Performance Tips¶
- Resolution vs. speed: Higher camera resolutions improve tracking at distance but cost more CPU time. 720p is a good default.
- Target FPS: The default 30 FPS is sufficient for most use cases. Increase to 60 FPS for fast-moving objects, but only if your camera supports it.
- Multiple objects: Each tracked body adds to the per-frame cost. Disable bodies that are not currently needed via
TrackedBody.enabled.