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:
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.
I have followed the developer guide (cesium-unity/developer-setup.md 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).
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.
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.
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.
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.
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.
@ryanlpeterson
It is good that you keep this thread a bit alive. I have been busy with another task the last couple of months, so unfortunately I haven’t really any progress to report. I am still hoping to get the time to dig more into it, but, of course, I also said that a couple of months ago…