Marker based augmented reality with Vuforia
Tags: vuforia, unity3d, augmented, ar
Published: 2023-02-17 05:38:41

If you are working with unity 2019 versions and facing problems with setting up Vuforia SDK for marker based reaity, this blog is going to help you out!
Here is an overview of how to set up Vuforia in Unity 2019.
Step 1 : 
Create a new project in unity 3D.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3mmor7o99eoslg8grk6u.png)


Step 2 : Select "Windows" and then "Package Manager".

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o147cu1wb0nzuzd5o3hu.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3cq7tu6pahp7ryowtdwg.png)
Make sure you have selected "all packages" before moving to the next step .

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ua5pcybx8hp7aeto5m09.png)

 


> Caution : If you are familiar with Unity 3d and trying to import Vuforia like other version , you may end up with an error!
> This is because in 2019 version , Unity has provided build in Vuforia.
> Just install it from package manager and you are ready to go :)

picture 

Step 3: Search "Vuforia Engine AR" in the package manager and then CLICK on "install".

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gtrfhmaspxykk0rvv2f0.png)

It will import the package in your project.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rdllenkaopa5r2m2olgk.png)
Step 4 : Get back to your scene . Right click on hierarchy panel . 
You can see "Vuforia Engine" in next panel, click on it and select "AR Camera".


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7pgzs63bjoov2ji7a6u.png)

AR Camera in the hierarchy will appear . 

> IMPORTANT : Don't forget to turn **"main camera" off **. It may cause you unwanted disaster later:|

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jdo6p4dufwsf5sl9nnus.png)

> PRO TIP: Keep saving the scene after new changes, so that even if unity crashes, you can continue your work from the same point.
Thank me later :p

Step 5 : Select "image" by clicking on hierarchy panel > "Vuforia Engine" > "Image".


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eebf4hre8oj6vxz3o3vm.png)

Step 6 :Now its time to get to your browser and build your own database ( Image target)
Search Vuforia developer > Develop > Target Manager 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sfg2mitvphi4ay8i1cau.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06sqs7jryca26mfgep9c.png)

> Create an ID if you don't have one or else sign in .

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u18uf2owz54itht4f276.png)

Step 7: Creating a license: Click on develop> license manager >
get basic > type you name > confirm .

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0lqoa0p00v1cxi9byymc.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qq1e80i3i1bnbf88k3qs.png)

A new license will appear, copy it and get back to your unity scene .

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qq7p99uu6pr9pzrn2muh.png)

Step 8: Select AR Camera and click on "vuforia engine configuration" in the inspector panel.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kqtgq0ortrdflz5nm5k8.png)

Step 9: Click on "Vuforia Engine Configuration" and paste the license .

> Caution: Don't click on add license. Just paste the license and close the panel. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wcynwpt5madcxzdhxso1.png)

Step 10 : Get back to your browser developer.vuforia.com and 
click on develop> target manager > add database .

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/voab8jwshqcm1603vm8r.png)

Add name of your image target and click on "create".

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p8pudu2egml3n12nrikl.png)
Your database will appear in the list , Click on it .
Add target > choose your file which you want to use as your image target > give a name to your image target and choose width =1.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gkd8wzjbn8thdo40ruet.png)

When everything is set , click on "ADD".

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jhrieyjdae5mzz82u3ct.png)

Step 11: download the database and drag and drop it to your unity scene and import it .

> IMPORTANT : Don't forget to click on unity editor before downloading your database.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/co3ckyc495mrs13mmxcz.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m2typzgfwix3wq0k385i.png)

Step 12: Click on "image target" in hierarchy> "database" in the inspector panel.
Your imported image target will appear as the option.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4h5uisc16m2q6xs9ymi9.png)

Step 13: Once you will select your database, it will appear in your scene , Adjust the AR camera .

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5v88k6s8zhokcrmifap2.png)

Step 14 : Place your object in front of image target .

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8astdxhvvmea769922sa.png)

> IMPORTANT: Don't forget to make the object child of your image target by simple drag and drop.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z6mj05yt7hi1245eulah.png)
Step 15 : You are ready to go! Just click on play .
Once you have added an image to your target, you can create an augmented reality experience by adding 3D models, animations, or other game objects to your scene.

Thankyou!
Don't forget to give a thumbs up 👍.
See you in next blog 😄.