AR Foundation on Unity
Hi !
In this post I describe how I made a simple AR application with image recognition.
I started by looking at tutorials on how to use AR on Unity. First, I followed the tutorial on Unity learn, to set up my project for AR : https://learn.unity.com/tutorial/configuring-unity-for-ar-development-2019-3?language=en#5e623ad9edbc2a0020cf8224 And then this video, because it talked about Image recognition an aspect we will need for our project : https://www.youtube.com/watch?v=9qErhhxoEVY
Si I started to put in place all the components needed for an AR project shown on Unity Learn.
I switched my project to Android, and modified the Player Settings -> Other Settings :

Then, with the Package Manager I installed the AR Packages : AR Foundation, AR Core XR Plugin, and ARKit XR Plugin for image tracking as shown in the video.

Then, I switched to the tutorial video. I deleted the main camera, and I added AR Session Origin and AR Session :

I added a Script to AR Session Origin, and created in the assets the ImageTarget of AR Session Origin : Create -> XR -> Image Reference


Then, I filled the slots of AR Session Origin :

I created a Sphere of size 0.2, and added to it a directional light oriented in order to light it up :

Then, I saved it as a prefab, deleted the object, and put the prefab as the Tracked Image Prefab of AR Session Origin :

Finally, in the Player settings I had some modifications to make. I removed Vulkan because it is not supported by AR Core. I unchecked Multithread rendering, and verified I at least selected Android 8.0 to make AR Core work. In Configuration, I put Install Location to Automatic, and Filter Touches to unchecked :

I tested it on my Android !
To do so, I build the apk, put it on my phone, and installed it.
I could also have connected my phone to my computer, selected it as the running device, enabled the debugging on my phone, and built it. But since my project will be about Street Art, it is better to have an application.


The next step is to replace the sphere with an animated AR object !