First experience of unity+vuforia--install and configure unity+vuforia, make a simple demo and package it into Android apk

1. Download the Unity Hub, and install the required version of the unity editor in the installation editor in the Hub.

When downloading the editor, pay attention to check android build support

Unity is free for personal use, register an account and obtain a personal use license

 

2. After the download is complete, create a new 3D project and enter the Editor environment

 If you don't see the option of vuforia engine in the GameObject in the upper left corner, go to vuforia's official website https://developer.vuforia.com/downloads/sdk to download the Vuforia Engine expansion package for the unity project.

3. After the expansion package is downloaded, go to Assets -- import package -- custom package to select the installation package just downloaded, and then import the installation package. If the import fails and an error is reported, check whether the version of the unity editor matches the expansion package of Vuforia Engine.

After success, the option of vuforia engine appears in the GameObject, and then click vuforia engine -- ar camera.

4. Enter vuforia official website, in develop, click get development key to create a new project

Enter the newly created project and copy the license

Then open the assets -- resources -- vuforia configuration in the lower left corner and copy it to the box on the right as shown in the figure. At this point, the project environment configuration is complete.

 

5. Enter the official website of vuforia again, click add database -- device, enter the name, and enter the picture to be recognized, it will automatically process the image recognition for you, and generate a resource package that can be imported into vuforia.

6. Repeat step 3 to import the data package of the picture. And click gameobject -- vuforia egine -- image target, click the generated imagetarget on the left, select from database for type in the options on the left, select the data package just imported for database, and the same for photos.

 

Then point the mouse to the imagetarget on the left column, click the right mouse button -- 3D object -- cube, then click the cube, and adjust the size and pose of the square in the Transform property on the left.

7. Click file -- build settings in the upper left corner, select android in paltform, and click switch platform in the lower right corner, then click build, and select the path to save the generated apk. Then import it to the Android phone, and it runs successfully! !

Guess you like

Origin blog.csdn.net/qq_62426375/article/details/123113019
Recommended