Skip to main content
Version: 14 Oct 2024

Migrating from ML1

The MLBarcodeScanner and MLArucoTracker APIs have been unified into a single MLMarkerTracker API. Additionally, unlike the ML1, the Marker Tracker on the Magic Leap 2 manages its own lifecycle, meaning that the Tracker does not have to be stopped or disposed manually when exiting the app.

MLBarcodeScanner Transition Table

TopicMagic Leap 1Magic Leap 2
Barcode ScannerMLBarcodeScannerMLMarkerTracker
Barcodes Found EventMLBarcodeScanner
.OnMLBarcodeScannerResultsFound
MLMarkerTracker
.OnMLMarkerTrackerResultsFound
StartMLBarcodeScanner
.StartAPI()
MLMarkerTrackerStartScanningAsync()
StopMLBarcodeScanner
.StopAPI()
MLMarkerTracker
.StopScanningAsync()
Enable Barcode ScanningMLBarcodeScanner
.Settings.EnableBarcodeScanning
MLMarkerTracker
.Settings.EnableMarkerScanning
Barcode TypeMLBarcodeScanner
.BarcodeData.BarcodeType
MLMarkerTracker.MarkerType
DataMLBarcodeScanner
.BarcodeData.stringData
MLMarkerTracker
.MarkerData.BinaryData

MLArucoTracker Transition Table

TopicMagic Leap 1Magic Leap 2
Barcode ScannerMLArucoTrackerMLMarkerTracker
Barcodes Found EventMLArucoTracker
.OnMarkerStatusChange
MLMarkerTracker
.OnMLMarkerTrackerResultsFound
StartMLBarcodeScanner
.StartAPI()
MLMarkerTracker
.StartScanningAsync()
StopMLBarcodeScanner
.StopAPI()
MLMarkerTracker
.StopScanningAsync()
Marker DataMLArucoTracker
.Marker
MLMarkerTracker
.MarkerData
Tracking StatusMLArucoTracker
.Marker.TrackingStatus
Removed
IDMLArucoTracker
.Marker.id
MLMarkerTracker
.MarkerData.ArucoData.Id
Marker LengthMLArucoTracker
.Settings.MarkerLength
MLMarkerTracker
.Settings.ArucoMarkerSize
DictionaryMLArucoTracker
.Settings.Dictionary
MLMarkerTracker
.Settings.ArucoDictionary