Creating a New AR Project with Metaio and Unity
1. Create a new Unity project.
Right click in the Project panel and select Import Package→Custom Package to import metaioSDK Unity package.
2. Add a user layer
Click on Layers drop down at top-right corner of the Editor and select Edit Layers. Add a new layer in next available User Layer, e.g. call it “metaioLayer”.
3. Set Application Signature
After creating a signature, you could start creating your own application. Delete Main Camera object created by default and instantiate a metaioSDK prefab by dragging and dropping it into hierarchy view of your project. Click on metaioSDK to edit the signature in the inspector window.
4. Add Tracking Config
Create folder within StreamingAssets folder and include tracking configuration with respective patterns.
Select metaioSDK in the Hierarchy panel and then in the Inspector view select StreamingAssets in a drop down menu Select Configuration. Then you could simply drag and drop your tracking configuration file to the Inspector view.
5. Binding Unity game objects with tracking data
Instantiate a metaioTracker prefab by dragging and dropping it into hierarchy view of your project. Metaio Tracker instance is a reference in your Unity project to a corresponding COS in your tracking configuration file. Note that you have to set Coordinate System ID that corresponds to a valid COS in the currently set tracking data. Once it has been done, you could attach new game objects to metaioTracker instance.
6. Build and Run for Platform
Check Player settings and set application signature before building and running.
Manually add the following libraries and frameworks in Xcode:
If using Metaio SDK below 6.0, you must modify the sensors.h, sensors.m, and .plist for GPS support.
If Android device was plugged into the computer via usb, Build and Run in Unity will place the android package file on your device for you. Otherwise, build a development build of the Unity app for Android Studio.
You must be logged in to post a comment.