This is a getting started guide for augmented reality development. A short but complete tutorial on how to set up Vuforia with Unity 5.6.0f3 personal. In the end you will have a 3D cube on a marker.
- Create Account at Unity
- Download Unity 5.6.0f3
- Create Account at Vuforia
- Login into Vuforia.com and download the .unitypackage via Download for Unity
- Develop -> License Manager tab, select Add License Key
- Develop -> Target Manager
- Create new Database by clicking Add
- Make digital photo of marker or download this one
- Cut out marker in Photoshop/Paint
- Targetmanager > yournewdatabase > add target
- Upload marker image and click Add. Problems with upload? Use jpg and not png!
- Download Database, select Unity Editor > Download
- Create new project in unity
- Import the vuforia .unitypackage and the database .unitypackage by dragging it into project window
- Obsolete API warning: click go ahead and upgrade
- Toolbar window > Vuforia > Configuration > paste the App license key there
-
Add your License Key and activate the datasets Toolbar window > Vuforia > Configuration > Datasets > load yournewdatabasename Database and click activate
- Project window > Assets > Vuforia > Prefabs > ARCamera add to scene
- Project window > Assets > Vuforia > Prefabs > ImageTarget add to scene
- Hierachy > Select ImageTarget
- Inspector > Find section Image Target Behaviour(Script)
- Inspector: set database to yournewdatabase and image target to marker
- Add a cube as the child of the ImageTarget gameobject
- Run and test your project
Optional next steps: you could add a script to the cube to make it rotate
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class rotate : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.Rotate(Vector3.up*Time.deltaTime*100);
}
}