Vuforia-Integration-in-Unity-PDF
Vuforia-Integration-in-Unity-PDF
Step 1
Go to: https://developer.vuforia.com
Here you must create a developer account (it’s free)
Step 2
Go to: https://developer.vuforia.com/downloads/sdk
Download the SDK for Unity
Step 3
Go to the “Develop” tab at the bottom and choose the “License Manager” sub-tab. In order to use
Vuforia, you will need to set up a License Key.
- Press “Add License Key” and create a new License Key.
Step 4
Go to the “Target Manager” sub-tab.
To be able to create augmented reality, the system needs to have some reference images/objects,
so it knows where to locate and orientate the virtual objects.
- To add these images/objects press “Add Database” and give it a name.
- Make sure “Device” is checked.
- After this click on your new database to open it.
Step 5
Now you will have to add some images/objects to the database.
- Press “Add Target” and choose “Single Image”.
- Select an images (high in detail, but without repeating patterns such as sand or grass).
- Give it a name and enter the width. The width will be the reference width of the object inside
Unity.
Step 6
When you have added all of your images, press “Download Dataset (All)”.
Choose “Unity Editor” and press “Download”.
Step 7
Create a new 3D unity project.
Import the SDK unitypackage which you downloaded in Step 2.
Import the Dataset unitypackage which you download in Step 6.
Step 8
Delete the Main Camera in the scene and add the “ARCamera” prefab.
The prefab can be found under Vuforia -> Prefabs -> ARCamera
Step 9
Add a new “ImageTarget” prefab to the scene.
The prefab can be found under Vuforia -> Prefabs -> ImageTarget
Step 10
Select the ImageTarget in the hierarchy. In the inspector view, there is a component called “Image
Target Behavior”. In this component there is a field called “Data Set” and “Image Target”.
Select you imported dataset.
Select the desired image target from that dataset.
Step 11
Create a new GameObject (e.g. a cube)
Child the 3D cube to the ImageTarget prefab.
Position the 3D cube where you want it, relative to the ImageTarget.
Step 12
To make sure Vuforia will use your imported data set, you will have to load it.
To do this, click on the ARCamera prefab.
- Find the component called “Database Load Behaviour” and click the checkbox called “Load Data
Set [name of you datase]”.
- Click on the checkbox “Activate”.
Step 13
Finally add the License Key, which you created in Step 3.
- Select the ARCamera prefab.
- Find the component called “Vuforia Behaviour” and copy/paste your license key to the field “App
License Key”.
Step 14
Print the images which you added to your database.
Step 15
Your unity project is now set up to support augmented reality with the use of vuforia.
Press “Play” in the Unity Editor and test you project.