❔ Troubleshooting

What to do when things don't work as expected with building your Unity app.

Known Issues

Our team is actively investigating the following issues:

  • Building your app for Universal Windows Platform (UWP) or HoloLens 2 might fail.

When I press Play in Unity I see a black screen!

You can test the connection to echoAR by pressing Play to start the app on Unity.

Note that the Game view will show a black screen - that is expected as the Game view tries to access the mobile AR camera which doesn't exists when running on a desktop machine.

When you build the app on iOS or Android the app will be able to access the camera

To test your app, you can switch to the Scene view and drag the echoAR prefab into the hierarchy. If the API key was set correctly you should be able to see 3D assets from the echoAR console stream into Unity.

I can see the 3D models in Unity but not in the mobile app!

If you are seeing the 3D models in Unity but not in the AR app you build, it might be the case that the models are too big/small to fit the screen. Try scaling them up/down by pinching the screen or by adding metadata.

Also, it might be a mobile shader support issue. Try adding the following metadata to your models in the console:

Keyword

Value

shader

Legacy Shaders/Diffuse

Now restart the mobile app.

I can properly see the 3D models in Unity but in the mobile app they lose their colors or completely white!

This might be a mobile shader support issue. The shaders used in Unity are not automatically included in the mobile app build.

To resolve the issue:

  • Add a folder called Resources inside the Assets/echoAR folder.

  • Copy all shaders you are using into the Assets/echoAR/Resources folder.

For example, when using the the open-source Unity + AR Foundation + echoAR example project, copy all files underAssets/echoAR/Libraries/glTFast/Runtime/Shaderinto the Assets/echoAR/Resourcesfolder you created.

This will force the shaders to be included in the mobile app build.

Now rebuild and re-run the mobile app.

The model is really big or very small!

Scale the model by pinching the screen with two fingers.

You can also change the size of the model by adding a metadata key named scale to the 3D models. See how in the Data Page section of the documentation.

The app builds and installs but the phone screen shows up black!

If the build process is successful and the app is running but the phone screen seems black, it might be the case that you need to build the app as 64-bit.

In August 2020, Google Play Services for AR (ARCore) removed support for 32-bit-only apps on some 64-bit devices. When you build your app as 32-bit for newer 64-bit devices, the app fails to create an ARCore session and might crash or result in a black screen when attempting to start an AR session.

Unity supports x64 since 2017 LTS.

To build your app as 64-bit, go to File > Build Settings > Player Settings.

Navigate toPlayer > Android Logo.

There under Other Settings scroll down and change your Script Backend to IL2CPP, and you will be able to check the ARM64 checkbox as active.

Now rebuild your app.

I am getting errors relating to ARKit/ARCore!

Unity apps build with AR Foundation require that your device is compatible with ARKit or ARCore.

Make sure to have Google Play Services for AR installed on your Android device.

I see some Unity error regarding AR Foundation!

Try using Unity 2019.4 to insure no AR Foundation package errors.

How do I use Unity?

Checkout the official Working with Unity manual or the full Unity documentation to get a better understanding of what you can build in Unity.

I am getting some other error.

Let's talk! Ask on Slack or send an email to [email protected] and please attach a screenshot of the error you are experiencing.