documentation

Build VisionLib Unity Projects
Level: Basic
BuildingRecommendationForVLUnityProjects_banner.jpg

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 reque.nosp@m.st@v.nosp@m.ision.nosp@m.lib..nosp@m.com

iOS

Prerequisites

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

  • An iOS device running iOS 9 or higher.
  • A Mac with Unity 2017.4 LTS or higher installed (we recommend using Unity 2018.4 LTS since support for Unity 2017 will end in Q1 2020)
  • Xcode 8 or higher installed (we recommend Version 9 and iOS 11).
  • An Apple developer account.

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

Since version 17.10.1 VisionLib will assume that you have Xcode 9 installed. You can still deploy to Xcode 8 and lower versions of iOS but you will have to remove the ARKit framework dependency from the project.

In order to deploy the application from Unity, you will have to do the following modifications on your player settings in the project:

  • Be sure that you have set the Camera Usage Description (NSCameraUsageDescription) and 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

Prerequisites

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

For the deployment in Unity, set the minimal SDK Version to 19.

Deploying to 64bit ARM Devices

Deploying to 64bit devices is supported by Unity version 2017.4.17 (and 2018.2 or higher) and is only working with a special version of Native Development Kit (NDK) in Version r13b from Google. The advantage of deploying with 64bit is a significant increase of the processing speed on devices which support 64bit applications. VisionLib supports this feature since vlSDK 19.7.1. Please also see https://blogs.unity3d.com/2019/03/05/android-support….

For deployment in Unity, please set the scripting backend to IL2CPP in the player settings and check only the ARM64 Target Architecture.