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 echo3D 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 echo3D prefab into the hierarchy. If the API key was set correctly you should be able to see 3D assets from the echo3D 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:
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/black!

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/echo3D folder.
  • Copy all shaders you are using into the Assets/echo3D/Resources folder.
For example, when using the the open-source Unity + AR Foundation + echo3D example project, copy all files underAssets/echo3D/Libraries/glTFast/Runtime/Shaderinto the Assets/echo3D/Resourcesfolder you created.
This will force the shaders to be included in the mobile app build.
Now rebuild and re-run the mobile app.

Still doesn't work?

When building the app through Build Settings, set the Texture Compression to ETC (default).

Still doesn't work?

Under Build Settings > Player Settings > Player > Optimization, check the Keep Loaded Shaders Alive* option.
​Another option is to add your shader to as a Built-in Shader.
Go toEdit -> Project Settings -> Graphics and includes your shader under Build-in Shader-Settings > Always Include Shaders.
Click Save to asset to create a ShaderVariant file under the Assets/Resources folder.
You can verify that the ShaderVariant includes your shader through the inspector.

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.
Unity - Manual: Unity User Manual 2020.3 (LTS)

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.
Last modified 3mo ago