Setting up ARCore

ARCore and ARKit are fundamentally very similar, but you can't compile ARKit on a Windows environment, which is what I'm presently using. Not to worry; when we get to ARKit, I will be using a macOS to give you a proper view and feel of how things are when using it.

That being said, it is now time to take a deeper look at ARCore.

ARCore was made by Google and is currently in the early preview stages; it hasn't even reached release 1.0 yet, so there are bound to be many changes, some of which could be extremely damaging to existing apps or games.

There are two ways to get the SDK preview for Unity. The first is through a Unity Package file (https://developers.google.com/ar/develop/unity/quickstart-android) and the other is through GitHub (https://github.com/google-ar/arcore-unity-sdk). Now, since I have been having an issue with downloading from Amazon Web Services lately, I will use the second link:

It is key to remember that, if you don't have a Samsung Galaxy 8 or a Google Pixel phone, you will not be able to run proper tests on your device. However, if you also install Android Studio, you do get access to the Android Emulator:

  1. To begin, create a new project in Unity and call it ARCoreTutorial:
  1. We need to change the Build Settings to Android before doing anything else:
  1. Next up, we need to change the Player Settings. The main settings we need to change are within the Other Settings tab, so let's take a look at what needs to be changed.

 

  1. Other Settings: We want Multithreaded Rendering unchecked; Minimum API Level should be Android 7.0 ‘Nougat' API level 24; and Target API Level should be Android 7.0 ‘Nougat' API level 24 or Android 7.1 ‘Nougat' API level 25:

               
                  5. XR Settings: We want ARCore Supported to be checked:

               
               6. Next up, we want to unzip the SDK or import the package into Unity3D:

Right away, we should see a DLLNotFoundException for tango_client_api2. This is normal and is well-known by the community. It should not cause any errors at runtime, though; it should be fixed in a later release.