Hello, I have created a simple 2D Unity scene in which I am viewing the ground from vertically above, making the 3D tileset look like a 2D map. I am using Cesium World Terrain and Bing maps imagery. It works fine on my PC, but when I run the .apk on an Android tablet, the imagery does not load at all - there is just a gray screen in place of the map. I got several warnings after building the apk, here are some of them:
Shader warning in ‘Cesium/CesiumDefaultTilesetShader’: implicit truncation of vector type at Files/2022.3.16f1/Editor/Data/CGIncludes/UnityShadowLibrary.cginc(60) (on gles3)
So I’ve realized that the reason for the issue might be related to the fact that I am having to specify the Cesium Ion access token every time I open the project in Unity. On launch, the following message pops up:
The ion token is usually stored in Assets/CesiumSettings/Resources/CesiumIonServers/ion.cesium.com.asset. It should be saved automatically when you modify it using the “Token” panel. As a guess: perhaps that file is under source control on your system by something like Perforce that stores files read-only, and so the save is failing?
Hi, thanks for the reply. I managed to fix the token issue using this workaround. But this didn’t actually fix the initial problem I was facing.
The .apk build still does not load Cesium imagery. All I see in place of the imagery is a gray screen. I am getting a message on the android device that “this app is not compatible with the current version of android”, but I don’t think that matters because the other elements I created using the Unity editor are working fine.
I tried creating a windows build for the same Unity project, and the imagery loads correctly in it. Please let me know if there is any more information I can provide, and thank you for the help so far.
Hi @Magmathrower8, my best guess is that your project is targetting ARMv7, which is a 32-bit platform and therefore is not compatible with Cesium fro Unity. See here (and note the message a bit further down noting that you must enable IL2CPP; Unity does not support Mono on 64-bit ARM):
If that’s not the problem, please check if the Cesium for Unity Samples project deploys and works on your device.