Skip to content

HoloLabInc/ARFoundationQRTracking-Unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARFoundationQRTracking-Unity

ARFoundationQRTracking-Unity is a module for QR Code tracking with AR Foundation.

Demo video of ARFoundationQRTracking-Unity

Target Devices

  • ARKit supported devices
  • ARCore supported devices

Getting Started

Prerequisites

Import the following packages into your Unity project.

  • AR Foundation
  • ARKit XR Plugin (iOS)
  • ARCore XR Plugin (Android)
  • UniTask

Install

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",

Usage

Add the following components to the "AR Session Origin" object.

  • AR Tracked Image Manager
  • AR Foundation QR Tracker

Then set the Max Number Of Moving Images value in the AR Tracked Image Manager to more than 0.

AR Session Origin setting

QR tracking

If you want to make a GameObject follow a specific QR code, please use the QRTracker prefab or the QRTracker script.

image

Event handling

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.

Sample scenes

Open "Package Manager" and select "AR Foundation QR Tracking" from the package list. Then click the "Import" button of ARFoundationTrackingSample.

ARFoundationQRTrackerSample.unity

This is a sample scene that displays a cube object following a specific QR code using QRTracker prefab.

ARFoundationQRVisualizationSample.unity

This is a sample scene for event handling.

Limitations

QR codes which contain non-ASCII characters are not supported.

License

Apache License 2.0

Acknowledgements

QR Code is a registered trademark of DENSO WAVE INCORPORATED.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages