Daydream VR Cookbook Now Updated for Unity 2019 and ARCore 1.8

I’ve just updated the accompanying files of the Google Daydream VR Cookbook so they’re using ARCore 1.8 and tested against Unity 2019. There have been some changes to Unity 2019 that differ from the book, this will affect how you set up your Unity ARCore project.

On installation of Unity 2019 make sure to select Android Build Support. This will automatically install the Android SDK and the Java JDK. It is no longer required to manually download and link the Android SDK and Java JDK in the Unity Preferences window. This update greatly simplifies the process of setting up your Android development environment in Unity, read more about it in the Unity docs.

In Unity 2019 only, for ARCore development (Chapters 7,8, and 9) you will need to install some packages into your project using the package manager. Select Window > Package Manager. Then select and install the following packages: Multiplayer HLAPI (required by the CloudAnchors sample) and XR Legacy Input Helpers (Instant Preview requires the TrackedPoseDriver). Now you can import the chapter’s sample file package without errors or warnings. For more info see the ARCore Unity quickstart guide: https://developers.google.com/ar/develop/unity/quickstart-android

I also had to remove “Vulcan” from Player Settings after selecting XR Settings > ARCore Supported. Do this in Player Settings / Other Settings / Graphics APIs and click the minus sign next to Vulcan to remove it. Vulcan does not currently support ARCore. If you don’t see Vulcan then you can skip this.

When you build and run on a device it might say you need to update Android API level to 26 or something similar. Follow the prompts to do this.

Remember you will need to build these scenes to an ARCore supported Android device, they will throw errors if you run them in the Unity Editor.

That’s basically it. Most of the changes involve setting up the Unity project for AR development not the actual code. There shouldn’t be any breaking changes in the ARCore 1.8 SDK itself.

If you are mid-project and want to update the ARCore SDK to the latest, it is a super easy process. Simply delete the Google ARCore SDK folder from your Unity project and then download the latest SDK, then simply drop it in the project folder to install it.

You’ll find the link to the Google Daydream VR Cookbook’s companion files in the preface of the book. You can purchase the book from Amazon here.

Leave a Reply

Your email address will not be published. Required fields are marked *