documentation

Build VisionLib Unity Projects
Level: Basic
BuildingRecommendationForVLUnityProjects_banner.png

Here are some recommendations for building your Unity Scene.

Note: This document is dynamic, we add topics constantly whenever changes to Unity and attached deployment platforms occur. You faced problems yourself? Write us at visio.nosp@m.nlib.nosp@m.-supp.nosp@m.ort@.nosp@m.visom.nosp@m.etry.nosp@m..com

Adjust License

For developing and testing, you will probably use a VisionLib trial or developer license. As soon as you are ready to ship your application, you will then need to adjust your used license option.
For example, you can use a deployment license to deploy in App Stores and need to bind your (3D model) tracking targets to it via their hashes.

Find more information on licensing options here: License Types.

macOS

In order to deploy the application to a standalone macOS Application, open the Player Settings and:

  • Set a Camera Usage Description (NSCameraUsageDescription)
  • Set a valid bundle identifier

iOS

Prerequisites

In order to deploy to iOS you will need the following prerequisites.

  • An iOS device running iOS 11 or higher.
  • A Mac with Unity 2021.3 LTS or higher installed.
  • A matching version of XCode installed.
  • An Apple developer account.

We assume that you have already exported a unity scene to an iOS device before.

In order to deploy the application to an iOS device, open the Player Settings and:

  • Set a Camera Usage Description (NSCameraUsageDescription)
  • Set a valid bundle identifier

Changes by the Plugin

The plugin automatically performs the following modifications to the Xcode project generated by Unity:

  • Restricting build to only use 64-bit: arm64
  • Enable Bitcode=NO
  • Link Binary With Dynamic Libraries
    • libxml2.dylib
    • libz.dylib
  • Link with Frameworks
    • Metal.framework
    • Accelerate.framework
    • GLKit.framework

Limitations

  • Please do not set the output to use Simulation SDK - this will not work!

Known Issues

  • With ARKit support enabled, a drift in tracking may occur (misplaced augmentations) when the object is not visible for a while and the visual-inertial tracking of ARKit takes over. This is due to an inaccurately estimated scaling factor between both tracking methods.

Android

Note: Unity projects containing VisonLib.SDK can only be built and deployed to Android using Unity 2020 or newer –⁠ see System Requirements.

Build Settings

Please install the Android SDK to be able to deploy applications to your android device. You will need at least Android in version 5.0 for the deployment to work. We recommend using a device supporting OpenGL ES 3.

For the deployment in Unity, set the following player settings (under Other Settings):

  • Set the minimum API Level to Android 5.0. "Lollipop" (API level 21)

If deploying to 64bit devices, the processing speed can be increased significantly by additionally setting the following:

  • Change Scripting Backend from Mono to IL2CPP
  • Check the target architecture ARM64, uncheck ARMv7
Build_AndroidPlayerSettings.png

Note: Unity might ask you to update the Android NDK when trying to build after those changes (each Unity version requires a specific version of the Android NDK). Simply press the Download button on Unity's prompt, download and unzip the NDK and reference the path the next time Unity asks for the NDK's location.

Build_AndroidNDK.png

Note: On macOS (Catalina and higher), using the updated NDK might be blocked because of an untrustworthy developer certificate. In this case you have to allow the NDK binaries to be executed in the "Security & Privacy" settings of your macOS.

ARCore

If you are using extendible tracking with ARCore, make sure that ARCore is installed on the target device. For more information on extendible tracking, see External SLAM (ARKit/ARCore) Support.

Windows

Visual Studio Redistributables

In order to use the VisionLib SDK on Windows, you need to have the Microsoft C Runtime installed. If you are using Visual Studio 2019 for C++ development, it should already be installed on your computer. Otherwise you can download a separate installer for your target architecture directly from Microsoft: