In this tutorial, you'll learn the basic setup operations that are required for most Tango apps you'll create in Unity. The tutorials for Tango features such as motion tracking and augmented reality all use this setup as a starting point.
Create a new project in Unity
- Select File > New Project. This opens the Projects window.
- In the Project name text box, enter a name for your new project.
- Accept the default location for your project displayed in the Location text box, or click the icon in the right side of the box and then navigate to a different location.
- Make sure that the project is set to 3D.
- Click Create Project.
Import the Tango SDK
If you haven't already downloaded the Tango SDK .unitypackage file from our Downloads page, do so now.
- Select Assets > Import Package > Custom Package.
- Navigate to the TangoSDK .unitypackage file that you downloaded, and then open it.
In the Import Unity Package dialog, make sure all the boxes are checked (they should be by default), and then click Import at the bottom right.
The Tango assets are displayed in the Assets folder of the Project panel.
Delete the main camera
In the Hierarchy panel, select and then delete the Main Camera gameObject.
All of our Tango Unity How-To guides and most of the apps you'll create use some type of custom "prefab" camera that is found in the Tango SDK. However, for certain apps, the Main Camera may be useful (for example, a puzzle/stealth game where you see your movement in the third person). If you're planning such an app, keep the Main Camera in your project.
Add the Tango Manager
Select the All Prefabs folder to view its contents, and then drag the Tango Manager prefab into the Hierarchy view.
Set the build settings
You only need to set the build settings once per project; after that, when you need to create a new build, you can just open the File menu and then click Build and Run.
- Select File > Build Settings.
- In the Platform list, select Android, and then click the Switch Platform button. Unity takes a moment to import some assets; the Assets Progress dialog keeps you updated.
- After the switch platform process finishes, click the Player Settings button.
- Click Other Settings to open that panel, and then enter your desired package name into the Bundle Identifier field. In this example we use com.google.tango.prefab; for more information about Android application package names, see App Manifests.
- Click the Minimum API Level drop-down list and then choose API Level 17 or higher.
- Close the Build Settings dialog.
At this point, you have completed basic setup operations. You can continue from here with one of the following tutorials: