Unity ARCore [01] – Setting up the SDK Tutorial

Unity ARCore [01] - Setting up the SDK Tutorial



Hey everyone, in this lesson, we are gonna go over how to actually set up ARCore on our new Unity project. So, here I just have a brand new Unity project open, I got the sample scene here. So this is where we get the SDK from. This is on Google’s github repo. There will be a link down the list, and summary on how to get this. But all we need to do, is click on the clone a download button. We’ll download this here as a zip, and when this downloads, all we need to get from this, is not all the folders that we see here, instead let’s go onto assets, and we just need to drag in the Google ARCore, and play services resolver folders into our project. So here we got the zip file. And all we need to do here is just open up this folder here, open up assets, extract those out to any place on your computer really. We can then exit out of this. And then what we want to do is drag them into our Unity project right here. Okay, you mas see that there are a few errors here, saying that some of the scripts don’t have certain things. Now, what we need to do also, is add in some of the Unity packages that we need in order to run this. So I’m gonna go up to window, package manager, and in here, what we want to do is scroll down to the bottom. We want to install XR Legacy input helpers, so we click install on this one, and this just allows us to basically detect the position and rotation of a certain device. And we also want to install Multiplayer HLAPI, so click install on this one here as well. And this just allow us… This is the package we need in order for the ARCore cloud and gets to work. So we’ll install this one right here, and once that is complete, we should then be able to exit out of here, and the errors should be gone. So there we go, it’s all working now. But we can’t build this to a device right now and run it because there is nothing really that is set up, to actually work for AR. We actually have to create a few game objects that will allow us to actually connect to the AR SDK, and start detecting plane, start creating feature points and all that stuff. So, here inside of the hierarchy, let’s right click and create a new empty object, and this object here is gonna be called ARCore device. As a trial… As, or in this object, we need to add two components, the first one is gonna be our ARCore session, and this just basically runs the entire sort of AR system in Unity here. Now, it’s asking us for first of all, a device camera direction. We can choose the back facing or front facing camera, let’s just stick it to back facing for now. We can also give it then a session config and a camera config filter, now this, we need this in order to basically set up some of the configurations for the session and for the camera. Now if we go to Google ARCore here, and then go configurations, you’ll see that we have two configurations here already set up for us, we got the default camera config filter and the default session config. Let’s look at ARCore device and drag this into their perspective config slots. There we go, we got that set up and that is the ARCore device set up and ready to go. Next, we need to dragged the main camera in as a child of ARCore device and first of all, what we want to do on the camera, is set the clear flags to a solid color, and add in two components. The first one is going to be a TrackedPoseDriver right here. We just want to keep this on Generic XR Device. Center Eye, we wanna change this to color camera, and then we want to pretty much keep everything here the same except update type, we wanna change this to update, and yup, let’s also then disable use relative position and now we can add another component called the ARCore background renderer, and this is going to basically make it so that the background of this camera, what we can see with the camera is going to be what our camera sees. So this background material here, we are just gonna set this here to be the AR background. There we go. And that is ARCore pretty much set up, that’s all the basic stuff we need in order to run, this AR app and have the systems working in place, now from here, we can add various different things such as the ability to visualize plains, the ability to interactive plains, and the ability to do many other things inside of ARCore, which we will be going over in the future lessons. So I’ll see you then in the next lesson.

Free Tutorials:
– Unity:
– Phaser:
– Machine Learning:
– Web Dev:
– Android:
– Swift:
– VR:


What do you think?

CryEngine 3 Editor Tutorial - Getting Started (1)

CryEngine 3 Editor Tutorial – Getting Started (1)

Unreal Engine 4: Tutorial movimiento IA Enemigos (español)

Unreal Engine 4: Tutorial movimiento IA Enemigos (español)