Getting Build failed due to compilation issues in scripts on Universal Windows Platform (UWP)

when i build the project, error occured.
(build platform : universal windows platform)

Would like to know why there are compilation issues in script on Universal Windows Platform?

Error :
Library\PackageCache\com.cesium.unity@0.1.2\Runtime\Cesium3DTileset.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
Library\PackageCache\com.cesium.unity@0.1.2\Runtime\CesiumBingMapsRasterOverlay.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
Library\PackageCache\com.cesium.unity@0.1.2\Runtime\CesiumCreditSystem.cs(1,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)

UnityEditor.BuildPlayerWindow+BuildMethodException: 83 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer

The built and shipped version of Cesium for Unity currently only supports Windows (non-UWP), macOS, and Android. It’s probably possible to build it for UWP by following the developer instructions, but we haven’t tried:

Do you have any plan of supporting UWP in the shipped version in the future and, if so, could you give an estimate of when that would be?

We don’t have any near-term plans to do this ourselves, but would gladly accept a pull request from the community with the (likely minor) changes needed to get it to work.

Ok, thank you for your quick response. I will try the method described above (cesium-unity/ at main · CesiumGS/cesium-unity · GitHub).

Just a quick update on this issue…

I have followed the developer guide (cesium-unity/ at main · CesiumGS/cesium-unity · GitHub) and have managed to get things up and running for the editor, and it seems to be able to compile also the native stuff for the platforms included in the shipped version. However, it does not work out of the box for UWP.

I think that I have managed to get some steps forward by adding conditional compile sections for UNITY_WSA in the ConfigureReinterop.cs scripts and by modifying CompileCesiumForUnityNative.cs slightly, but the native build process seems to stop prematurely when generating code for CesiumGeospatial.vcxproj. I guess that I am missing some stuff to make it work.

BTW I am trying to get Cesium running on Hololens 2 with an ARM64 build (Unity supports 4 different architectures on UWP).

I can see that there now is a pull request for supporting Android x86_64 (Magic Leap 2) which is great. It would be nice if you would also consider adding the UWP build capability as well.

We are currently using Mapbox in our Hololens 2 project, but we are looking for alternatives such as Cesium or ArcGIS. Cesium looks very promising, and we like the openness of it (open source etc.) but it would require that we can build for UWP ARM64.

  • Kind regards, Jakob

Hi @JakobAnarkyLabs,

If you’re getting to the part in the package process where it tries to compile the native code, it should display the path to a log file. If you can share that contents of that log file, we may be able to help figure out what’s going wrong.


Hi @Kevin_Ring

Thanks for getting back to me.
Here, I have attached a zip with the native build log file as well as the modified scripts and a CMake toolchain file.

I don’t have a particularly deep understanding of this process of building native stuff, nor of using CMake, so I am sorry if there is some obvious stuff that I am missing. I just tried some things that seemed sensible.

Jakob (22.1 KB)

Thanks, it looks like that got pretty far! There seem to be some compiler errors in SQLite, which is kind of surprising. I think the first thing I’d try is upgrading sqlite3 to the latest version. There could be some incompatibility in the version we’re currently using.

Consider opening a draft pull request as you work on this. That will make it much easier for others to see what you’ve done and try it out themselves, compared to a ZIP file.


Thank you :slight_smile:

Yes I/we will definitely consider opening a pull request. There are some people at our office who know more about this native code compilation than me - I will try to make them look at it at some point.