ARFoundationQRTracking-Unity is a module for QR Code tracking with AR Foundation.
- ARKit supported devices
- ARCore supported devices
Import the following packages into your Unity project.
- AR Foundation
- ARKit XR Plugin (iOS)
- ARCore XR Plugin (Android)
- UniTask
Open Packages\manifest.json and add the following lines to the "dependencies" section.
"jp.co.hololab.arfoundationqrtracking": "https://github.com/HoloLabInc/ARFoundationQRTracking-Unity.git?path=packages/jp.co.hololab.arfoundationqrtracking",
"jp.co.hololab.arfoundationqrtracking.libraries": "https://github.com/HoloLabInc/ARFoundationQRTracking-Unity.git?path=packages/jp.co.hololab.arfoundationqrtracking.libraries",Add the following components to the "AR Session Origin" object.
AR Tracked Image ManagerAR Foundation QR Tracker
Then set the Max Number Of Moving Images value in the AR Tracked Image Manager to more than 0.
If you want to make a GameObject follow a specific QR code, please use the QRTracker prefab or the QRTracker script.
If you want to implement more complex behavior, you can use recognition events.
When the QR Code is detected, the OnTrackedQRImagesChanged event of ARFoundationQRTracker is called.
For more details, please refer to the sample scripts.
Open "Package Manager" and select "AR Foundation QR Tracking" from the package list. Then click the "Import" button of ARFoundationTrackingSample.
This is a sample scene that displays a cube object following a specific QR code using QRTracker prefab.
This is a sample scene for event handling.
QR codes which contain non-ASCII characters are not supported.
Apache License 2.0
QR Code is a registered trademark of DENSO WAVE INCORPORATED.