Troubleshooting
What to do when things don't work as expected with building your Unity app.
Last updated
Was this helpful?
What to do when things don't work as expected with building your Unity app.
Last updated
Was this helpful?
Our team is actively investigating the following issues:
Building your app for Universal Windows Platform (UWP) or HoloLens 2 might fail.
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 exist 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.
If you are getting a "Multiple precompiled assemblies with the same name Newtonsoft.Json.dll"
error in Unity, this issue is most often caused by a conflict with an old version of a default Unity library.
There are a few ways to fix this error:
1. If you are beginning a new project, consider using a newer version of Unity. Unity versions 2020.3.30f1 or later will not experience this issue.
2. Update the "Version Control" unity package in your project to 1.15 or later via the package manager by clicking the arrow next to the package:
3. If your project will not use Unity Collab or Plastic SCM, you can simply remove the "Version Control" package from your project without issue:
4. Delete the folder Assets/echo3D/Libraries/JsonDotNet/Assemblies
.
Keyword
Value
shader
Legacy Shaders/Diffuse
Now restart the mobile app.
Also, when using Android make sure to upgrade your mobile OS to Android 8 or higher since in 2021 all security certificates for Android 7 were invalidated thus blocking HTTP requests.
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.
This will force the shaders to be included in the mobile app build.
Now rebuild and re-run the mobile app.
Under Build Settings > Player Settings > Player > Optimization
, check the Keep Loaded Shaders Alive*
option.
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.
Scale the model by pinching the screen with two fingers.
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.
Unity supports x64 since 2017 LTS.
To build your app as 64-bit, go to File > Build Settings
. Click Player Settings
.
Navigate to Player > 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.
Using some Unity versions with built-in libraries might conflict with libraries in our Unity SDK.
Solution: Delete the Assets/echoAR/Libraries/JsonDotNet/Assemblies
.
After adding Android SDKs and support modules to Unity and trying to build your app you might encounter errors in the Unity console similar to:
Failed to install the following Android SDK packages as some licences have not been accepted.
The error message should also show the path to the Android SDK. For example:
Using Android SDK: C:\Program Files\Unity\Hub\Editor\2019.2.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK
Solution:
Step 1
Create a file called repositories.cfg
under C:\Users\
USERNAME
\.android
that contains:
Step 2
Open a CMD terminal with Administrator privileges.
Navigate to the Android SDK path and then to ~\tools\bin\
. For example:
C:\Program Files\Unity\Hub\Editor\2019.2.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin\
Run ./sdkmanager.bat --licenses
Accept all licenses.
Step 3
Right-click on the Android SDK folder and make sure it is not set to read-only.
Step 4
Rebuild the app.
Solutions:
There are two cases where changing the material on your 3D model in Unity makes sense.
You don’t want to use Blender or some other 3D modeling software
Your model’s material looks different in Unity than what you see in Blender/your 3D modeling software (or it doesn’t show up at all and your object is white).
Here’s a quick way to get the right material on your 3D object, even if you didn’t create the asset yourself:
Try using Unity 2019.4 to insure no AR Foundation package errors.
This error is caused by the Unity Burst package being unable to find the tools it needs to run. Typically these are components installed with a Visual Studio Tools installer. the build error will include a list of the required components; ensure all components are correctly installed.
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 (e.g, 1000 or 0.001).
Also, it might be a mobile shader support issue. Try to your models in the console:
This might be a mobile issue. The shaders used in Unity are not automatically included in the mobile app build.
For example, when using the the open-source example project, copy all files underAssets/echo3D/Libraries/glTFast/Runtime/Shader
into the Assets/echo3D/Resources
folder you created.
When building the app through Build Settings
, set the to ETC (default)
.
is to add your shader to as a Built-in Shader.
You can also change the size of the model by adding a metadata key named scale
to the 3D models. See how in the section of the documentation.
In August 2020, . 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.
Forgetting to set your in the inspector or using old versions of our Unity SDK might not include the required with the API calls it makes resulting in an Error: Security key not found or incorrect
or a Failed query
errors in the Unity console.
Type your as the value for the parameter secKey
in the script file Packages/co.echo3D.unity/Runtime/Echo3DHologram.cs
.
Disable the through the console. Go to the Collections and Sharing page and then the , and uncheck the API Token.
You can export your Unity creation (with the animation, eye movements, etc.) to a 3D model using , or other real-time exporters that save the game object as 3D file in any of the .
Then you can then upload that model file generated to our platform or which will automatically create a WebAR experience, convert the model to other 3D formats, and more.
Unity apps built with AR Foundation require that your device is compatible with or .
Make sure to have installed on your Android device.
Check out the official manual or the full to get a better understanding of what you can build in Unity.
Let's talk! Ask on or send an email to and please attach a screenshot of the error you are experiencing.