Cesium Prerequisites

Hello,
I’m trying to build a unity project with cesium for unity 1.2.0.
If i build it in my unity editor i have no problem.
But if i build it with this docker image: unityci/editor:2021.3.25f1-windows-mono-1.1 i
have the following error.

I believe there is any dependency issue in the editor docker image, which doesn’t allow tu build
the project with cesium.

Any hint on any particular prerequisites of cesium in an ubuntu bases docker image ?

2023-05-22 17:07:56 /additionalfile:“Library/Bee/artifacts/500b0aE.dag/CesiumRuntime.AdditionalFile.txt”
2023-05-22 17:07:56 ##### Custom Environment Variables
2023-05-22 17:07:56 DOTNET_MULTILEVEL_LOOKUP=0
2023-05-22 17:07:56 ##### ExitCode
2023-05-22 17:07:56 1
2023-05-22 17:07:56 ##### Output
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTile.cs(2,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumDebugColorizeTilesRasterOverlay.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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumFeature.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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumGeoreference.cs(3,7): error CS0246: The type or namespace name ‘Reinterop’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumGlobeAnchor.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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumIonRasterOverlay.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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumMetadata.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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumTileExcluder.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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumTileMapServiceRasterOverlay.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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumWebMapServiceRasterOverlay.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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumWgs84Ellipsoid.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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/NativeDownloadHandler.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?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTile.cs(13,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTile.cs(13,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTile.cs(34,39): error CS8795: Partial method ‘Cesium3DTile.getBounds(IntPtr, double4x4)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(41,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(41,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(635,30): error CS8795: Partial method ‘Cesium3DTileset.SetShowCreditsOnScreen(bool)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(637,30): error CS8795: Partial method ‘Cesium3DTileset.Start()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(638,30): error CS8795: Partial method ‘Cesium3DTileset.Update()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(639,30): error CS8795: Partial method ‘Cesium3DTileset.OnValidate()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(641,30): error CS8795: Partial method ‘Cesium3DTileset.OnEnable()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(642,30): error CS8795: Partial method ‘Cesium3DTileset.OnDisable()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(648,29): error CS8795: Partial method ‘Cesium3DTileset.RecreateTileset()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/Cesium3DTileset.cs(653,29): error CS8795: Partial method ‘Cesium3DTileset.FocusTileset()’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumBingMapsRasterOverlay.cs(27,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumBingMapsRasterOverlay.cs(27,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumBingMapsRasterOverlay.cs(65,41): error CS8795: Partial method ‘CesiumBingMapsRasterOverlay.AddToTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumBingMapsRasterOverlay.cs(68,41): error CS8795: Partial method ‘CesiumBingMapsRasterOverlay.RemoveFromTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumCreditSystem.cs(93,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumCreditSystem.cs(93,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumCreditSystem.cs(176,30): error CS8795: Partial method ‘CesiumCreditSystem.UpdateCredits(bool)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs(9,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementationAttribute’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs(9,6): error CS0246: The type or namespace name ‘ReinteropNativeImplementation’ could not be found (are you missing a using directive or an assembly reference?)
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs(15,41): error CS8795: Partial method ‘CesiumDebugColorizeTilesRasterOverlay.AddToTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.
2023-05-22 17:07:56 Library/PackageCache/com.cesium.unity@1.2.0/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs(17,41): error CS8795: Partial method ‘CesiumDebugColorizeTilesRasterOverlay.RemoveFromTileset(Cesium3DTileset)’ must have an implementation part because it has accessibility modifiers.



2023-05-22 17:07:56 AssetDatabase: script compilation time: 49.569640s
2023-05-22 17:07:56 Scripts have compiler errors.
2023-05-22 17:07:56
2023-05-22 17:07:56 Aborting batchmode due to failure:
2023-05-22 17:07:56 Scripts have compiler errors.
2023-05-22 17:07:56
2023-05-22 17:07:56 + case $? in
2023-05-22 17:07:56 + echo ‘An error occurred . Exit’
2023-05-22 17:07:56 + exit 1
2023-05-22 17:07:56 /home/bokken/build/output/unity/unity/External/baselib/builds/Include/C/Internal/Baselib_Semaphore_FutexBased.inl.h(151): Assertion failed (count >= 0) - Destruction is not allowed when there are still threads waiting on the semaphore.
2023-05-22 17:07:56 Caught fatal signal - signo:5 code:128 errno:0 addr:(nil)
2023-05-22 17:07:56 Obtained 12 stack frames.
2023-05-22 17:07:56 #0 0x0055838f3fb35c in RegisterRuntimeInitializeAndCleanup::ExecuteCleanup()
2023-05-22 17:07:56 #1 0x0055838f2588e0 in RuntimeCleanup()
2023-05-22 17:07:56 #2 0x005583907f5d3f in DoQuitEditorWithExitCode(int, bool)
2023-05-22 17:07:56 #3 0x0055838f3f2bc2 in CheckBatchModeErrorString(core::basic_string<char, core::StringStorageDefault > const&)
2023-05-22 17:07:56 #4 0x00558390bc0500 in RefreshInternalV2(AssetDatabase::UpdateAssetOptions, ScanFilter const&, InternalRefreshFlagsV2)
2023-05-22 17:07:56 #5 0x00558390b9a76b in StopAssetImportingV2Internal(AssetDatabase::UpdateAssetOptions, InternalRefreshFlagsV2, ScanFilter const*, char const*)
2023-05-22 17:07:56 #6 0x00558390b9cea9 in InitialRefreshV2(bool)
2023-05-22 17:07:56 #7 0x0055839074d6a7 in Application::InitializeProject()
2023-05-22 17:07:56 #8 0x005583907f74da in InitializeUnity(void*)
2023-05-22 17:07:56 #9 0x005583907f6b69 in main
2023-05-22 17:07:56 #10 0x007f88bd835c87 in __libc_start_main
2023-05-22 17:07:56 #11 0x0055838e9a3029 in _start
2023-05-22 17:07:56 Trace/breakpoint trap
2023-05-22 17:07:56 An error occurred . Exit

Cesium for Unity only includes binaries for Windows (Intel), macOS (both Intel and Apple), Android (Intel and ARM), and iOS. Only 64-bit platforms are supported, there is no support for any 32-bit platform.

If your Docker image isn’t one of the supported platforms, then that is the problem.

If you’re trying to build Cesium for Unity yourself from source rather than using the version that includes pre-built native code, you’ll need to follow the Developer Setup instructions.

I @Kevin_Ring, thank you for your reply.
I’m using Unity Package Manager to download Cesium for Unity.
I have the manifest.json with the following entry:

“com.cesium.unity”: “1.2.0”,

The docker image i’m using is unityci/editor:2021.3.25f1-windows-mono-1.1 which is based on Ubuntu, and the supported architecture is linux/amd64. So i think it should work, right ?

No, Linux is not a supported platform.

We’ve successfully compiled and run it on Linux, so it’s definitely possible. But we don’t include the necessary binaries out of the box yet. If you need to run on Linux, you currently need to compile the native code yourself by following the developer setup instructions, adapting them for Linux along the way:

Ok, i undestrand.
I’m trying to build from source.
If i have a build script which runs on a pipeline, once i have cesium binary, where i have to put inside my unity project?

Thank you in advance for your support.

I’m getting this error, when building Cesium for Unity on an ubuntu based docker image:

cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo
...
...
cmake --build build -j14 --target install --config RelWithDebInfo

/com.cesium.unity/native~/extern/cesium-native/CesiumGltf/src/FeatureTexturePropertyView.cpp:72:11: error: conversion to ‘std::__cxx11::basic_string::size_type {aka long unsigned int}’ from ‘const int32_t {aka const int}’ may change the sign of the result

What compiler are you using? Looking at line 72, that error doesn’t make much sense. And I just confirmed I can compile it successfully under Ubuntu on WSL2 with GCC 9.4.0.