📜 ⬆️ ⬇️

Build the Augmented Faces ARCore example in Unity

image

I hope this article will be useful to those who want to feel the possibilities of ARCore augmented reality in Unity, but at the same time could not find understandable instructions.

We’ll compile an example of Augmented Faces ARCore Augmented Faces app for Unity, it will track a face through the camera and overlay a 3D model with a fox snout.

Why in Unity?
')

To accomplish our task, we will need Unity itself, the ARCore for Unity SDK , an Android- compatible device, the Android SDK . You can do without the device, but in this article this option is not reflected.

Unity


We create the new project in Unity. Specify 3D type
image

After creating the project, we import the Augmented Faces ARCore package that was previously downloaded, which is called arcore-unity-sdk-1.7.0.unitypackage .

Import package
image

Unity will ask for exactly what to import.

Import everything
image

After successful import in the Project window we find and open the scene with an example.

Assets \ GoogleARCore \ Examples \ AugmentedFaces \ Scenes
image

Specify the location of the Android SDK.

Edit / Preferences / External tools
image

Switch the platform to Android, and click “Switch Platform”.

File / Buld settings
image

In the previous window, click the button “Player settings ..” to configure the publication.
Change the name of the Android application.

Other settings
image

We are convinced whether support ARCore.

XR Settings
image

We return to the window “Build Settings” and indicate our device. On the device should be enabled debugging via USB, and installation via USB.

Run device
image

This should be enough to build and run the application on our device. In the same window, click "Build And Run", as a result we get something like that.

Ready application
image

Source: https://habr.com/ru/post/441224/


All Articles