Setup Guide
Set Up Unity Development Environment
Install MAXST AR SDK for Unity
Run Sample App (Unity Editor)
Build Sample App (Android)
Build Sample App (iOS)
Issue Sample App (iOS)
Set Up Unity Development Environment
Requirements
We recommend Unity 2018 or later to use MAXST AR SDK in Unity.
For more information on Unity development tools, visit Unity Website.
※ To use MAXST AR SDK for Unity, you need basic knowledge of Unity development tools and Unity development.
Install MAXST AR SDK for Unity
Open the Unity project or create a new one.
Import MAXST AR SDK for Unity by double-clicking the downloaded MAXST AR SDK Package or by selecting 'Assets / Import Package / Custom Package' from the Unity Editor menu and selecting the downloaded Package.
For MacOS, download the Unity for MacOS Plugin, unzip it, and copy the MaxstAR.bundle file to Assets/Plugins.
Since 2021.1 and earlier versions do not support Notarization on MacOS, you will need to run the following command to de-secure it.
cd Assets/MaxstAR/Plugins
xattr -cr MaxstAR.bundle
sudo spctl —master-disable
Run Sample App (Unity Editor)
To run the MAXST AR SDK sample app for Unity, follow these steps.
In Unity Editor, select 'File > Build Settings'
In the Project View, add scenes from the 'Assets > MaxstARSamples > Scenes' folder to 'Build Settings > Scenes In Build'
Place the Home scene at the top.
In Project View, double-click the ImageTracker scene in the Assets > MaxstARSamples > Scenes folder.
Select ARCamera in Hierachy View and click Configuration button of ARManager Script in Project Settings window.
In the Configuration window, select the desired camera in Camera Settings > Webcam Type, and select the desired resolution in Camera Settings > Camera Resolution.
In Project View, double-click the Home scene in the Assets > MaxstARSamples > Scenes folder.
Press the Play button on the Toolbar.
※ Moving from the Target scene to the Home scene by pressing the esc key.
In the Game window, select the desired tracker. When you point the camera at the target, the content is augmented.
- Image Tracker: Image Sample
- Marker Tracker: Marker Sample
- QRCode Tracker: QRCode Sample
※ Trackers that use ARKit/ARCore (Space Tracker, Fusion Tracker series) cannot be run in the Unity Editor.
Build a Sample App (Android)
To build the MAXST AR SDK sample app for Unity, follow these steps.
※ For official documentation on Android build settings, see Unity Build Settings.
In Unity Editor, select 'File > Build Settings'.
In the Project View, add scenes from the 'Assets > MaxstARSamples > Scenes' folder.
Place Home Scene at the top.
In the Platform window, select Android and click the Switch Platform button.
In the Platform window, click the Player Settings button.
Set the Minimum API Level to API level 26 or higher in Other Settings.
In the Project Settings window, check Other Settings > Identification > Override Default Package Name, and then enter a Package name.
Enter the license key. For details on how to enter the license into Unity, please refer to License Key, and to get the license key, please refer to License Manager.
To set up an Android 64-bit build, in the Project Settings window, go to Other Settings > Configuration > Scripting Backend drop-down menu > change to IL2CPP, and check Target Architectures > ARM64.
Set Minify to None in the Publishing Settings.
After connecting the device, select 'File > Build&Run'
※ If the Android SDK is not properly configured, the file selection window of the message(Select Android SDK root folder) may appear. You can do this by choosing Edit > Preferences from the Unity Editor menu bar.
Tracker using ARCore Build Settings
To build Tracker using ARCore on Android, please add the build settings below.
※ List of trackers using ARCore
Space Tracker, Image Fusion Tracker, Instant Fusion Tracker, Marker Fusion Tracker, Object Fusion Tracker, QR Fusion Code Tracker
If Auto Grapchis API is checked in Other Settings, uncheck it
If you have Vulkan< in the Graphics APIs in Other Settings, delete it.
If Multithreaded Rendering is selected in Other Settings, uncheck it.
Android Split APK(OBB)
Split APK is used to upload apk file to PlayStore. PlayStore can not upload more than 100Mb apk, so we will upload apk and obb files separately.
- File -> Build Settings -> Android ->Player Settings -> Publish Settings -> Split Application Binary.
Android 64-bit build settings
Starting with the MAXST AR SDK version 4.1.1, Unity-Android 64-bit builds are supported. To use a 64-bit build, follow these steps to build your build:
Click the File menu> build settings> Player settings button
In the Project Settings window, select the Other Settings > Scripting Backend drop-down menu> Change to IL2CPP
ARM64 check
Build a Sample App (iOS)
To build the MAXST AR SDK sample app for Unity, follow these steps.
※ For official documentation on Android build settings, see Unity Build Settings.
In Unity Editor, select 'File > Build Settings'.
In the Project View, add scenes from the 'Assets > MaxstARSamples > Scenes' folder.
Place Home Scene at the top.
In the Platform window, select Android and click the Switch Platform button.
In the Platform window, click the Player Settings button.
In the Project Settings window, enter ‘12.0' in Target minimum iOS Version and ‘description' in Camera Usage Description .
In the Project Settings window, enter Bundle Identifier.
Enter the license key. To get the license key, please refer to License Manager.
※ Fusion Tracker works on iOS Version 11 or later.
Select 'File > Build'
Run the generated Xcode project file.
Connect a test phone / configure the Signing and build.
Issue Sample App (iOS)
Issue 1 :
Undefined symbols for architecture armv7: "_maxst_TrackedImage_getYuv420_888YUVPtr", referenced from:
Reason:
An error about framework and library linking occurs in XCode
Checklist:
1-1. Have you set the Architectures of “Build Settings/Architectures” to arm64?
- Please note that from iOS 11, only 64-bit apps work.
1-2. Did you build by selecting the iOS device?
1-3. Did you properly add ARKit.framework, Accelerate.framework and libMaxstAR.a files to “Targets/UnityFramework/General/Frameworks and Libraries” before proceeding with the build in XCode?
- After exporting Unity-iOS project to XCode go to add framework and library.
- Set the Platforms of ARKit.framework, Accelerate.framework and libMaxstAR.a file to macOS + iOS.
1-4. Have you properly added ARKit.framework, Accelerate.framework and libMaxstAR.a files to “Targets/UnityFramework/Build Phases/Link Binary With Libraries” before proceeding with the build in XCode?
- Set the Platforms of ARKit.framework, Accelerate.framework and libMaxstAR.a files to macOS + iOS.
1-5. Did you set Enable Bitcode to No in “Build Settings/Build Options”?