How to Use Samples

Preparation

Prepare Unity Environment

Read Platform Requirements to learn system and Unity versions EasyAR Sense Unity Plugin support and get Unity packages from the Unity website.

If it is your first time, suggest using LTS Releases from Unity.

Prepare Package

Get latest EasyAR Sense Unity Plugin package from download page. Samples are included in the package.

Get Licensing

Before using EasyAR Sense, you need to register on www.easyar.com and get a license key .


Editor Project Configuration

Create Empty Unity Project

Choose 3D template When create a project. EasyAR do not support Scriptable Render Pipeline like Universal Render Pipeline by default in this version.

../_images/image_s1_1.png

Add Plugin Package

Extract the downloaded zip file, use Unity’s Package Manager window to install the plugin from a local tarball file.

../_images/image_s0_1.png

Choose the com.easyar.sense-*.tgz file in the popup dialogue.

NOTE: The tgz file cannot be deleted or moved to another place after import, so it is always a good practice to find a suitable place for the file before import. If you want to share the project with others, you can put the file inside the project and your version control system.

Import Sample(s) into Project

The samples are distributed within the plugin package. You can import samples into your project using Unity’s Package Manager window.

You can import all samples together using the first **All**, or samples from the same category like **WorldSenseing All**,

../_images/image_s1_5.png

Or you can import individual sample without ** in the sample name.

../_images/image_s1_6.png

NOTE: samples start with ** cannot be imported when individual samples exist in the project, there would be duplicate assets otherwise.

Fill in License Key

Choose <EasyAR -> Sense -> Configuration> from Unity menu and fill in the License Key in the Inspector.

../_images/image_s1_2.png ../_images/image_s1_3.png

This will create an asset in your Assets folder, do not move or delete it.

../_images/image_s1_4.png

Service Configurations

Some samples use EasyAR services. Service configurations are required for

This step can be skipped if not using above samples.

Add scenes

Add sample scenes of the Unity project into build settings. Move the launcher scene (AllSamplesLauncher) to the top if there is a one in the project.

../_images/image_s1_7.png ../_images/image_s1_8.png

Run in the Editor

If you have AllSamplesLauncher scene, you can open it and it can launch all samples. Or you can choose to open a single sample scene to run.

../_images/image_s1_9.png

If a camera is connected to the computer, it can run EasyAR Sense Unity Plugin samples from Unity Editor after the above configurations.

../_images/image_56.png

Note that not all features can work in the editor. Some of them can only run on Android or iOS devices. There will be popup messages and error logs for those unsupported samples when running in the editor.

../_images/image_57.png

Run on Android or iOS Devices

Configure the project according to Android Project Configuration or iOS Project Configuration, switch to target platform and then click on the Build or Build And Run button in Build Settings or use other alternatives will compile the project and install the binaries on the phone. Permissions should be granted on the phone when running.

../_images/image_s1_10.png ../_images/image_s1_11.png