This tutorial will get you up and running with a simple Augmented Reality application in Unity. The instructions are intended for Unity developers of any experience level. You will add a gameObject to a scene, and then you'll view the gameObject in your surrounding environment as seen through your device's camera lens.
If you haven't set up your computer to develop with Tango in Unity yet, see Getting Started With Unity.
Go to the Setup for All Unity Tango Apps page and perform the basic setup operations on that page. When you have finished, return to this page and continue on with the steps below.
Configure the Tango Manager
In the Hierarchy panel, select Tango Manager, and then in the Inspector panel, make sure the following options are selected:
- Auto-connect to Service.
- Enable Motion Tracking with Auto Reset.
- Auto Reset.
- Enable Video Overlay with Method = Texture and Raw Bytes.
Add the Tango Camera
- In the Project view under Assets, click the TangoPrefabs folder to display its items.
- Drag Tango Camera into the Hierarchy view.
Add and move a sphere
- On the GameObject menu, point to 3D Object, and then select Sphere.
- In the Transform section of the Inspector, change the Z value for the sphere's position to 2.
Click the Game tab. The view should look like this:
When you are finished viewing, click the Scene tab.
Build and run your project
- On the File menu, click Build and Run.
- In the Build Settings dialog, click Build and Run.
- In the Build Android dialog, enter a name in the Save As field, and then click Save.