Augmented Reality is a technology that has really taken the world by storm. I was fortunate enough to have worked on some AR apps early in my career and it has been amazing watching how Unity has evolved into one of the defacto engines for building MR content. Back in 2014, I used Unity and Vuforia to do basic image tracking and displaying a 3D model in AR. Nowadays, we are spoilt with a host of amazing free tools that’s built right into Unity!
AR Foundation is Unity’s framework that provides the high-level AR functionalty. Instead of working directly with ARKit (Apple) and ARCore (Android) we can use a single framwork, whilst being able to deploy to both Android and Apple. More info here
I wanted to replicate what I did using Vuforia in the past, but using AR Foundation instead.
The scene is made up of:
ARTrackedImageManagerdoes all the heavy lifting
ReferenceImageLibrary- which contains your images you want to use as markers (QR codes in my case)
Prefabthat will be spawned once the marker is tracked
I wrote a script that maps the names of the reference images to the
GameObject it’s mapped to. Thus allowing me to know which one to display.
There are some improvements that I could make to this simple project: