Hello, after going through the Getting Started guide for Cesium in Unity, I was just wondering if building to an Android device is supported? When running within the Unity Editor everything works as intended, however building an APK and running on my Android tablet, the terrain fails to load. Is there a step that I missed or is Android not yet supported?
Hi @eSantos16,
Cesium for Unity supports building to Android, so it sounds like something is wrong. Do you see any error messages in the editor when you build?
构建时,在编辑器中有报shader的错误:Shader error in ‘Cesium/CesiumDefaultTilesetShader’: undeclare identifier ‘UNITY_DISPLAY_ORIENTAION_PRETRANSFORM’ at/Unity/2021.3.2f1c1/Editor/Date/CGlncludes/UnityCG.cginc(817) (on vulkan)
I got the same error too.
Shader error in ‘Cesium/CesiumDefaultTilesetShader’: undeclared identifier ‘UNITY_DISPLAY_ORIENTATION_PRETRANSFORM’ at Files/Unity/Hub/Editor/2021.3.18f1/Editor/Data/CGIncludes/UnityCG.cginc(817) (on vulkan)
and
Shader error in ‘Cesium/CesiumUnlitTilesetShader’: undeclared identifier ‘UNITY_DISPLAY_ORIENTATION_PRETRANSFORM’ at Files/Unity/Hub/Editor/2021.3.18f1/Editor/Data/CGIncludes/UnityCG.cginc(817) (on vulkan)
I’m not familiar with shaders, so maybe there is something wrong with it?
thank you.
At the same time, there also print a lot of logs like:
[error] [SqliteCache.cpp:412] database is locked
when I’m trying to build with android.
Thank you.
Tonny
Yes, so am I. I don’t know how to handle the terrain image when running on my phone after packaging.