ARCore support for Aryzon in Unity


#1

For AR Core integration follow these steps

On Android
Download AR services package and install on your android device (supported devices include: Nexus, Nexus 2 & Samsung S8)
https://github.com/google-ar/arcore-android-sdk/releases/download/sdk-preview/arcore-preview.apk
If you do not own one of the “required” android phones, download this modded AR services package:
https://github.com/tomthecarrot/arcore-for-all/raw/service-mod/service-mod/arcore-preview-modified.apk
Note: the tracking won’t be as smooth on these devices, see this as strictly testing devices. Also, still not every device will be supported with this package, test it out for yourself.
Go to: https://developers.google.com/ar/develop/unity/getting-started if you get stuck somewhere.

In Unity
In Unity 2017.2 or higher, create a new project and download and import the arcore example project, you can download it here: https://github.com/google-ar/arcore-unity-sdk/releases/download/sdk-preview/arcore-unity-sdk-preview.unitypackage
In your player settings, go to XR settings and turn on “ARCore supported”. In other settings turn off multithreaded rendering and set minimum api level to android 7.0 or higher.

Aryzon
Download and import the Aryzon unity package and open the ARCore example scene called: “HelloAR”.

Replace the ARCoreDevice/firstpersoncamera with the Aryzon prefab and set references of:

ARCoreDevice/sessioncomponent.cs/firstpersoncamera
to -> ARCoreDevice/Aryzon/ARCamera

and

ExampleController/helloARController.cs/firstpersoncamera
to -> ARCoreDevice/Aryzon/ARCamera/Cameras/Camera_Right

Delete the vuforia folder and slash out #define USE_VUFORIA in ARMode.cs to disable Vuforia functionality.

Disable the Aryzon/ARCamera/ARGyroCamera script to get correct tracking.

If you’re building to an unsupported android device, go to: googleARCore->SDK->plugins in your project window and replace unitygar.aar with this file: https://github.com/tomthecarrot/arcore-for-all/raw/master/unitygar.aar
Build the project to your phone and run it. You can place objects to the pointer location by pressing the right side of the screen.

Still having problems? post them below and we’ll be happy to help out!


#2

#3

he maarten,
I just tried to implement your SDK with the new 1.0 ARcore SDK

I think that with the recent release of the ARcore SDK some things has changed. for example in the HelloAR scene I try to find ‘ARCoreDevice/sessioncomponent.cs/firstpersoncamera’ in order to replace it with your ARCamera but this ARCoreDevice is not in the HelloAR scene anymore.

Could this been changed with the 1.0 release?

Can you please update your documentation so we can implement this?
hope to hear
gr markv


#4

Hi Marteen, seems like things have changed a lot since this step-by-step. By chance do you have an updated guide for the new versions of Aryzon and ARcore? I got the ARCore samples working fine (ARCore 1.4 and Unity 2017.4) but I’m struggling a bit to get it to work with the Aryzon camera. Seems there’s no ARCamera anymore as part of the SDK, so any tip on how to get it to work is much appreciated. Thanks!


#5

Hi Matinas, things have changed quite a bit yes, things have gotten quite a bit easier now. If you have the ARCore sample running OK you can add the Aryzon sdk to it and should be up and running in no time. Follow these steps:

Add the Aryzon prefab to for example the HelloAR scene.
Select ARCore as your tracking engine on the Aryzon GameObject.
Drag ARCore’s First Person Camera GameObject into the ‘Follow object’ of the AryzonTracking component (it should create and show you events to enable and disable the camera, I noticed one time these get destroyed on build so I wonder if this works OK for you?)
Select Follow ARCore on the Aryzon GameObject.
Create a button and connect it to the AryzonTracking component on the Aryzon GameObject. Set it to start Aryzon mode.
Build and run

Check out our video tutorials as well. I haven’t had the time to do an ARCore one but the principle is really similar to this one from ARKit:

If there are any issues please let me know!


#6

Hi Maarten, great, got it working. Thanks!

Seems that some events are removed from the AryzonTracking component when trying to run it from the Editor, but it works just fine when building and deploying it on the device. Regardless this issue, do you know if there is some way of running/debugging it right from the editor as with Vuforia? I’m quite new with ARCore development, maybe I should keep reading the docs.

Thanks


#7

Thanks for your reply, we’ll have to fix the events issue. For ARCore there is ‘Instant Preview’: https://developers.google.com/ar/develop/unity/instant-preview

Have fun!