Compile and Run EasyAR Unity Samples

This article shows how to run EasyAR unity samples.

If you want to setup EasyAR Unity projects using EasyAR.unitypackage, please read this instead.


  • Unity 4.6 or later

  • (If target for Android) Android SDK with Build Tools at least version 23.0.1

  • (If target for iOS) iPhone or iPad device, or other real iOS devices (EasyAR do not support running on the simulator)

Open Sample

First you need to open unity sample project and open the scene in the sample.

Unity 4 is like bellow,


And Unity 5 like this,


Additional for Unity 5, after open the project, follow Unity instructions to upgrade the project, then you can use it with no difference compared to Unity 4.


Enter Key

Find “EasyAR” object and Enter “Key” in the inspector. Initialize will fail if a valid key is not provided.

../_images/image44.png ../_images/image45.png

Follow the instructions in the TextArea to fill the key.


All is done! You can now run the Unity sample on all platforms including Windows/Mac/Android/iOS.

XCode configure

If you are using latest Unity, this step is automatically done by Unity.

When you are generating iOS apps, after the automatic build step which put everything from Unity to XCode, you need one more step to make all things work.

XCode 6.x: add libc++.dylib into linker libraries.


XCode 7.x or later: add libc++.tbd into linker libraries. And Set Enable Bitcode to NO .

../_images/image48.png ../_images/image49.png

XCode configure for EasyAR SDK Pro

Add Accelerate.framework if you are using EasyAR SDK Pro samples.


iOS Privacy Settings

Some privacy settings are required on iOS.

To use camera, add Privacy - Camera Usage Description,


To use screen recording feature, add Privacy - Microphone Usage Description,


iOS arm64 Support

EasyAR SDK support iOS arm64 build from the first public release of EasyAR SDK 1.0.

Starting from EasyAR SDK 2.1.0, all Unity samples have IL2CPP option turned on by default.

If you are using older versions of EasyAR SDK samples, you need to manually turn on IL2CPP in Player Settings.


And change the architecture to Universal or arm64,


If you are using some older version of Unity, you may meet this compile error in XCode,


It is a Unity bug fixed in newer versions of Unity. It is suggested to upgrade your Unity, or just remove the word NORETURN like this.


Android IL2CPP

IL2CPP support for Android is not included in the official EasyAR Unity Plugin, we will add support in later versions. But if you are writing your own EasyAR Plugin for Unity, you can always enable IL2CPP support.