Book Image

Unity 2018 Augmented Reality Projects

By : Jesse Glover
Book Image

Unity 2018 Augmented Reality Projects

By: Jesse Glover

Overview of this book

Augmented Reality allows for radical innovations in countless areas. It magically blends the physical and virtual worlds, bringing applications from a screen into your hands. Meanwhile, Unity has now become the leading platform to develop augmented reality experiences, as it provides a great pipeline for working with 3D assets. Using a practical and project-based approach, Unity 2018 Augmented Reality Projects educates you about the specifics of augmented reality development in Unity 2018. This book teaches you how to use Unity in order to develop AR applications which can be experienced with devices such as HoloLens and Daydream. You will learn to integrate, animate, and overlay 3D objects on your camera feed, before gradually moving on to implementing sensor-based AR applications. In addition to this, you will explore the technical considerations that are especially important and possibly unique to AR. The projects in the book demonstrate how you can build a variety of AR experiences, whilst also giving insights into C# programming as well as the Unity 3D game engine via the interactive Unity Editor. By the end of the book, you will be equipped to develop rich, interactive augmented reality experiences for a range of AR devices and platforms using Unity.
Table of Contents (16 chapters)
Title Page
Copyright and Credits
Packt Upsell

Setting up the Unity project

The very first thing we are going to do is set Unity up on our Mac computer to be able to create our project. Since we know we will need ARKit, which only works on macOS, we will have different projects for the different chapters, as we don’t want any compilation issues:

  1. Let’s create a new project, and we will call it Chapter4 or Sound of Flowery Prose:
  1. Next up, we need to click on the store and search for ARKit to download and add it to our project:

  1. I am a bit of a stickler for organization, so we have to make sure to set up all the empty game objects we need to keep things organized. So, we will have four empty game objects called CameraParent, ARKitControl, ARCameraManager, and HitCubeParent. Your project should look like the one in the following screenshot:
  1. Drag the camera into the CameraParent empty game object:
  1. Create a Cube and drag the Cube into the HitCubeParent object:

Now that we have Unity basically set up as required, we can move on to creating and attaching...