Unity Sample Scenes and Codes with Vuforia Engine for Taiwan Team to get feet wet.
I recommand to install the latest long time support version of Unity. The latest LTS version Unity is 2018.4.5 https://unity3d.com/unity/qa/lts-releases?_ga=2.209183958.592804920.1564897662-2016385378.1562138615
When install unity, please make sure you tick the selection of ‘iOS support’, ‘Android support’ and ‘vuforia support’. For versions later than 2019.0, ‘vuforia support’ installation is in Unity Menu -> package manager.
My project is created with Unity 2018.4.3. If you use newer version Unity to open it, a automatic api-upgrade dialogue will pop-out. Just click Ok and upgrade.
Quick export an app and see the result on screen
The project contains vuforia core examples and a quick replacable ground plane demo provide by me. After cloning the project to native or download complete.
Open Unity -> Click Open:
Navigate to the path where project is and click select folder:
Input vuforia developer app license key in vuforiaConfigration(Shortcut to call it out to Inspector: PC: control+shift+v/ Mac OS: cmd + shift + v)
Open Build Setting(shortcut: control(cmd)+shift+B). Open Player Settings(Left down corner). Input company name and product name for this app. And make sure the ‘Vuforia Augmented Reality Supported’ option is checked:
And in Player Settings, Input a package name for app.
Leave the scenes in build as it is just like the capture. Build the app directly to your device. Open Build Setting. Select Android platform -> click switch platform button. Wait until unity Logo lays after that Android icon.
Then click Export. Unity will ask you a path to put generated apk file for Android. When apk is generated. Copy it to android device and install to experience AR.
These contents contains core functions of Vuforia Engine with Unity. And every type of scenerio is code provided in Unity scene：
3-CloudReco 3-CylinderTargets 3-GroundPlane 3-ImageTargets 3-ModelTargets 3-MultiTargets 3-ObjectReco 3-UserDefinedTargets 3-VirtualButtons 3-VuMarks
I think it is the best way to learn vuforia engine deeply.
And if you want to use simple replace demo. Please go and open ‘\Assets\AlbertKong-CreatedFolder\MoveRotateScale-Replacable.unityscene’
In vuforia configuration(ctrl+shift+v), at bottom, you can tick web camera option to use web camera to debug with out exporting to real device which will accelerate development progress.
With web camera development, you need to print the ground plane trigger target out:
You can replace the ‘thompson’ GameObject in this scene to any other object. Adjust object to the center.
The touch control script for scaling,moving, and rotating object is attached on ‘thompson’ GameObject. It interact with Object when user use one or two fingers to touch screen.
Click Play to play the scene.
To export this scene, delete previous core sample scenes and drag this scene into ‘Scene in Build’ then export.
If you want to export to iOS device you need to move exported iOS project to a Mac with Xcode. And use apple developer account to install the application to your iOS devices.