Leantouch_Vuforia_AR In Unity

Introduction

 
In this article, I will explain the LeanTouch_Vuforia_AR with some examples.
 
Prerequisites
 
Unity Environment version 2018.4.19f1
 

Create objects in Unity

 
Leantouch_Vuforia_AR In Unity
 
First, you have to open the Unity project. Delete the Main Camera from AR scene.
 
Leantouch_Vuforia_AR In Unity
 
Searching on the " Vuforia Developer Portal " in Google Chrome.
 
Leantouch_Vuforia_AR In Unity
 
Create a Database.
 
Leantouch_Vuforia_AR In Unity
 
Add the target trigger image.
 
Leantouch_Vuforia_AR In Unity
 
Download the database.
 
Leantouch_Vuforia_AR In Unity
 
Drag and drop the database. The database will be added to the AR scene View.
 
Leantouch_Vuforia_AR In Unity
 
Create the License key.
 
Leantouch_Vuforia_AR In Unity
 
Click on the "GameObject" menu in the menu bar. Select Vuforia Engine and pick the "AR Camera" option. The AR Camera will be added to the AR scene View.
 
Leantouch_Vuforia_AR In Unity
 
Click on the "GameObject" menu in the menu bar. Select Vuforia Engine and pick the "Image Target" option. The Image Target will be added to the AR scene View.
 
Leantouch_Vuforia_AR In Unity
 
Import 3D model in Unity. Drag and drop the 3D model to Image target in the AR scene view.
 
Leantouch_Vuforia_AR In Unity
 
Click on the "GameObject" menu in the menu bar. Select Create Empty (Game Object). The Create Empty will be added to the scene View.
 
Leantouch_Vuforia_AR In Unity
 
Rename the Empty Game object as Leantouch.
 
Leantouch_Vuforia_AR In Unity
 
Click on the Asset Store. Download the Leantouch and import in AR scene View.
 
Leantouch_Vuforia_AR In Unity
 
Drag and drop the Lean touch scripts to leantouch in the AR scene view.
 
Leantouch_Vuforia_AR In Unity
 
Drag and drop the Darg transform, scale and rotate scripts to 3D model in the AR scene view.
 
Leantouch_Vuforia_AR In Unity
 
Click on the "GameObject" menu in the menu bar. Select UI and pick the "Button" option. The Exit button will be added to the AR scene View.
 
Leantouch_Vuforia_AR In Unity
 
Create a C# Script
 
Right-click on Assets. Select Create >> C# script.
 
Leantouch_Vuforia_AR In Unity
 
Rename the script as Exit. Drag and drop the Exit scripts to the Exit button in the AR scene view.
 
Leantouch_Vuforia_AR In Unity
 
Write the code like the following.
 
Double click on the Exit script. The MonoDevelop-Unity editor will open up.
  1. using System.Collections;  
  2. using System.Collections.Generic;  
  3. using UnityEngine;  
  4. public class Exit: MonoBehaviour {  
  5.     public void exitgame() {  
  6.         Debug.Log("exitgame");  
  7.         Application.Quit();  
  8.     }  
  9. }  
Save the program.
 
Copy the license key.
 
Leantouch_Vuforia_AR In Unity
 
Click on Resources. Select >>VuforiaConfiguration paste on the App license key.
 
Leantouch_Vuforia_AR In Unity
 
Click on the "File" menu in the menu bar. Select the build settings, switch the platform, and add Open scene select.
 
Leantouch_Vuforia_AR In Unity
 
In Android Player settings, set the Player settings specific to the Android platform. For a description of the general Player settings, see the Player settings.
 
Leantouch_Vuforia_AR In Unity
 
After you specify your build settings, click the Build button to create your build. To build the app, click Build And Run to create and run your build on the platform you have specified. Complete the build.
 
Leantouch_Vuforia_AR In Unity
 
Build and run the app, and you will able to see a floating leantouch_Vuforia_AR.
 
Leantouch_Vuforia_AR In Unity
 

Summary

 
I hope you understood LeanTouch_Vuforia_AR in Unity.