Successfully packaged Linux
Running the screen in Unity
Running the interface in Ubuntu 18.04 LTS system
How to solve the problem of not displaying the map?
Player.log output by Unity
Player.rar (5.7 KB)
The native code appears to be missing. Did you build it by following the Developer Setup instructions?
Switch to the window platform for packaging, packaging interface
Right, because we ship binaries for Windows, so you don’t need to build them manually like you do for Linux.
How does Linux need to build them manually?
Linux is not currently a supported platform for Cesium for Unity.
It’s possible to run Cesium for Unity on Linux (others have done it), but it is not simple. It doesn’t work out of the box, and there are no step-by-step instructions available. The developer setup instructions basically explain how it’s done, but they’re written for Windows. They need to be adjusted for Linux. This is especially true if you’re trying to build for Linux from Windows . That should also be possible, but I’m not aware of anyone ever having done it.
So if you want to take this on, you’ll have to work through the process carefully, understanding what you’re doing along the way. Some knowledge of C++ and CMake will be necessary. I can probably help when you run into problems, but can’t guide you through it step-by-step.
If that sounds too difficult, I’m afraid you’ll just have to wait until we add official Linux support.
What if building Linux from Linux? Would it be much easier?
Yes, it will probably be easier. We know of people that have done that successfully, at least.
building Linux from Linux,When are you planning to launch this feature?
We have no definite timeline for it right now.
y_gg
August 15, 2023, 10:09pm
14
The linux version compiles successfully
Hello, I need to release the Linux version. Can you add a WeChat account for a detailed chat? My WeChat account: LWK18020018226
johni
February 19, 2025, 2:59pm
18
hi, I really need to run cesium on linux, I am also usin 22.04(I got that from your desktop background). Could you please help me, guide me how you did it. My unity version is 2022.3.55f1 and I tried following the cesium developer guide(for now the cesium-unity-samples project) and I get an error:
NotImplementedException: The native implementation is missing so Update cannot be invoked. This may be caused by a missing call to CreateImplementation in one of your constructors, or it may be that the entire native implementation shared library is missing or out of date.
CesiumForUnity.Cesium3DTileset.Update () (at ./Reinterop/Reinterop.RoslynSourceGenerator/Cesium3DTileset-generated.cs:127)
janine
February 20, 2025, 3:29pm
19
Hi @johni , welcome to the community!
Usually, this is expected when you first setup the environment. You need to execute the dotnet publish
step before you open Unity, so that the Reinterop files are generated. If you don’t see them generating, force Unity to recompile your code by adding a trivial change (such as adding whitespace) to a file in the plugin. Then, close Unity and run the cmake
steps in the native~
folder.
I hope that works, but if not, it would help if you shared what you did step-by-step so we can better advise!
johni
February 20, 2025, 6:10pm
20
hi thank you for helping me out! I finally got the Unity Cesium working in ubuntu, except now there is a problem where 3d tiles won’t load. when I open the 01_CesiumWorld scene I do see terrain data but when I tried like the 03_CesiumSanFrancisco scene I see no 3d tiles. I even tried hosting my own 3d tiles world but it simply doesn’t show anything. I really need this to work. what can I do?
Hi @johni , glad you got it compiling!
You probably need to add a call to registerAllTileContentTypes
. We’re not entirely sure why this is needed on Linux and not other platforms, but other users have found it helpful. See here:
opened 10:04PM - 01 Oct 24 UTC
Hi, first of all thanks for this amasing software!
I got an issue installing … cesium in unity on linux.
to my system:
`6.10.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 12 Sep 2024 17:21:02 +0000 x86_64 GNU/Linux`
`unityhub version 3.9.1` --> https://aur.archlinux.org/packages/unityhub
I installed the 2022.3.48f1 editor version
**### first attempt**
I created a new project (3D core).
under "services" -> "gerneral settings" -> "Package Manager" I added following:
```
Cesium
https://unity.pkg.cesium.com
com.cesium.unity
```
then I installed the cesium plugin in version 1.13.0
The consol log give me some errors:
```
Library/PackageCache/com.cesium.unity@1.13.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?)
```
seems that Reinterop for dotnet is not coming with that repo plugin.
**### second attempt**
I followd the instructions here: https://github.com/CesiumGS/cesium-unity/blob/main/Documentation~/developer-setup.md
installed:
`extra/dotnet-sdk 8.0.8.sdk108-1 (85.3 MiB 300.0 MiB) (Installed)`
`extra/nasm 2.16.03-1 (341.2 KiB 2.4 MiB) (Installed)`
`dotnet --version 8.0.108`
`cmake version 3.30.4`
cloned [cesium-unity-samples](https://github.com/CesiumGS/cesium-unity-samples)
then `cesium-unity` inside it.
in `cesium-unity-samples/Packages/com.cesium.unity` i called:
```sh
[<user> com.cesium.unity]$ dotnet publish Reinterop~ -o .
MSBuild version 17.8.5+b5265ef37 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
Reinterop -> /home/<user>/cesium-unity-samples/Packages/com.cesium.unity/Reinterop~/bin/Debug/netstandard2.0/Reinterop.dll
Reinterop -> /home/<user>/cesium-unity-samples/Packages/com.cesium.unity/
```
got the message:
```
DllNotFoundException: CesiumForUnityNative assembly:<unknown assembly> type:<unknown type> member:(null)
NotImplementedException: The native implementation is missing so OnValidate cannot be invoked.
```
did:
```sh
cd cesium-unity-samples/Packages/com.cesium.unity/native~
cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug
```
run into following error:
```sh
[<user> native~]$ cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug
CMake Deprecation Warning at extern/tidy-html5/CMakeLists.txt:20 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Warning (dev) at extern/tidy-html5/CMakeLists.txt:26 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The following variable(s) would be set to empty:
PROJECT_VERSION
PROJECT_VERSION_MAJOR
PROJECT_VERSION_MINOR
PROJECT_VERSION_PATCH
This warning is for project developers. Use -Wno-dev to suppress it.
-> TIDY_SO_VERSION = 58. This is an EVEN (stable) release.
-- *** Debug Logging is NOT enabled.
-- *** Building support for runtime configuration files.
-- *** Only building static library STATIC, version 5.8.0, date 2021.07.10
-- VCPKG_TRIPLET x64-linux-unity
-- EZVCPKG v0.1 starting up
Website: https://github.com/jherico/ezvcpkg
-- EZVCPKG_BASEDIR envrionment variable not found and basedir not set, using default /home/<user>/.ezvcpkg
-- EZVCPKG initializing
commit: 2024.07.12
repository: https://github.com/microsoft/vcpkg.git
local dir: /home/<user>/.ezvcpkg/2024.07.12
-- EZVCPKG Building/Verifying package asyncplusplus using triplet x64-linux-unity
CMake Error at extern/cesium-native/cmake/ezvcpkg/ezvcpkg.cmake:83 (message):
EZVCPKG failed with error 1
Call Stack (most recent call first):
extern/cesium-native/cmake/ezvcpkg/ezvcpkg.cmake:185 (EZVCPKG_CHECK_RESULTS)
extern/cesium-native/cmake/ezvcpkg/ezvcpkg.cmake:279 (EZVCPKG_BUILD)
extern/cesium-native/cmake/ezvcpkg/ezvcpkg.cmake:293 (EZVCPKG_FETCH_IMPL)
extern/cesium-native/CMakeLists.txt:50 (ezvcpkg_fetch)
*** The output from the command was:
error: Invalid triplet: x64-linux-unity
Built-in Triplets:
x64-osx
arm-neon-android
x64-uwp
x64-windows
arm64-android
x86-windows
arm64-osx
x64-linux
arm64-uwp
x64-android
arm64-windows
x64-windows-static
Community Triplets:
arm64-osx-dynamic
mips64-linux
x64-windows-static-release
x64-xbox-xboxone
x86-android
arm64-ios
x64-openbsd
x64-windows-static-md
ppc64le-linux
arm64-linux-release
arm-linux-release
arm64-linux
x86-mingw-static
x64-mingw-static
s390x-linux
x64-windows-static-md-release
x86-ios
x64-osx-dynamic
x64-linux-release
x86-windows-static-md
x86-windows-static
loongarch32-linux-release
arm64-ios-release
s390x-linux-release
arm64-ios-simulator
arm-windows
arm64-osx-release
arm-mingw-static
arm-windows-static
riscv32-linux
x86-windows-v120
loongarch64-linux
arm-mingw-dynamic
loongarch64-linux-release
arm-linux
riscv64-linux-release
arm64-mingw-dynamic
x64-xbox-xboxone-static
arm-android
x64-linux-dynamic
x64-uwp-static-md
arm64ec-windows
wasm32-emscripten
x64-osx-release
x64-ios
ppc64le-linux-release
x64-xbox-scarlett-static
x64-freebsd
armv6-android
arm64-mingw-static
arm-uwp-static-md
arm-ios
arm64-uwp-static-md
x64-windows-release
x86-uwp
x64-xbox-scarlett
arm64-windows-static
arm64-ios-simulator-release
x86-uwp-static-md
x86-mingw-dynamic
arm64-windows-static-md
riscv32-linux-release
riscv64-linux
x86-freebsd
arm64-windows-static-release
loongarch32-linux
arm-uwp
x86-linux
x64-mingw-dynamic
Overlay Triplets from "/home/<user>/cesium-unity-samples/Packages/com.cesium.unity/native~/vcpkg/triplets":
x64-android-unity
x64-windows-unity
arm64-osx-unity
arm64-ios-unity
arm64-android-unity
x64-osx-unity
x64-uwp-unity
arm64-uwp-unity
See https://learn.microsoft.com/vcpkg/users/triplets?WT.mc_id=vcpkg_inproduct_cli for more information.
CMake Error at extern/cesium-native/cmake/ezvcpkg/ezvcpkg.cmake:102 (message):
Call Stack (most recent call first):
extern/cesium-native/cmake/ezvcpkg/ezvcpkg.cmake:185 (EZVCPKG_CHECK_RESULTS)
extern/cesium-native/cmake/ezvcpkg/ezvcpkg.cmake:279 (EZVCPKG_BUILD)
extern/cesium-native/cmake/ezvcpkg/ezvcpkg.cmake:293 (EZVCPKG_FETCH_IMPL)
extern/cesium-native/CMakeLists.txt:50 (ezvcpkg_fetch)
-- Configuring incomplete, errors occurred!
```
(this is maybe interresint for you guys)
work around it with following:
```sh
cd /home/<user>/.ezvcpkg/2024.07.12
cp triplets/x64-linux.cmake triplets/x64-linux-unity.cmake
```
run the first cmake call again:
```sh
[<user> native~]$ cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug
CMake Deprecation Warning at extern/tidy-html5/CMakeLists.txt:20 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Warning (dev) at extern/tidy-html5/CMakeLists.txt:26 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The following variable(s) would be set to empty:
PROJECT_VERSION
PROJECT_VERSION_MAJOR
PROJECT_VERSION_MINOR
PROJECT_VERSION_PATCH
This warning is for project developers. Use -Wno-dev to suppress it.
-> TIDY_SO_VERSION = 58. This is an EVEN (stable) release.
-- *** Debug Logging is NOT enabled.
-- *** Building support for runtime configuration files.
-- *** Only building static library STATIC, version 5.8.0, date 2021.07.10
-- VCPKG_TRIPLET x64-linux-unity
-- EZVCPKG v0.1 starting up
Website: https://github.com/jherico/ezvcpkg
-- EZVCPKG_BASEDIR envrionment variable not found and basedir not set, using default /home/<user>/.ezvcpkg
-- EZVCPKG initializing
commit: 2024.07.12
repository: https://github.com/microsoft/vcpkg.git
local dir: /home/<user>/.ezvcpkg/2024.07.12
-- EZVCPKG Building/Verifying package asyncplusplus using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package expected-lite using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package fmt using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package glm using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package ms-gsl using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package rapidjson using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package spdlog using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package stb using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package uriparser using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package abseil using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package draco using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package ktx using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package modp-base64 using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package meshoptimizer using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package openssl using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package s2geometry using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package libjpeg-turbo using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package sqlite3 using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package tinyxml2 using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package libwebp using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package zlib-ng using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package picosha2 using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package earcut-hpp using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package cpp-httplib[core] using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package libmorton using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package zstd using triplet x64-linux-unity
-- EZVCPKG Building/Verifying package catch2 using triplet x64-linux-unity
-- EZVCPKG done
-- CMAKE_TOOLCHAIN_FILE /home/<user>/.ezvcpkg/2024.07.12/scripts/buildsystems/vcpkg.cmake
-- PACKAGE_BASE_DIR /home/<user>/.ezvcpkg/2024.07.12/packages
-- PACKAGE_BUILD_DIR /home/<user>/.ezvcpkg/2024.07.12/installed/x64-linux-unity
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done (7.4s)
-- Generating done (0.4s)
-- Build files have been written to: /home/<user>/cesium-unity-samples/Packages/com.cesium.unity/native~/build
```
then the second one:
```sh
[<user> native~]$ cmake --build build -j14 --target install --config Debug
[ 5%] Built target tidy-static
[ 7%] Built target CesiumUtility
[ 8%] Built target CesiumJsonWriter
[ 8%] Built target Cesium3DTiles
[ 11%] Built target CesiumGeometry
[ 14%] Built target CesiumJsonReader
[ 16%] Built target CesiumAsync
[ 20%] Built target CesiumGltf
[ 21%] Built target Cesium3DTilesReader
[ 22%] Built target Cesium3DTilesWriter
[ 22%] Built target CesiumIonClient
[ 25%] Built target CesiumGeospatial
[ 27%] Built target CesiumGltfWriter
[ 29%] Built target CesiumGltfReader
[ 29%] Built target CesiumGltfContent
[ 45%] Built target CesiumForUnityNative-Editor
[ 47%] Built target CesiumQuantizedMeshTerrain
[ 49%] Built target Cesium3DTilesContent
[ 52%] Built target CesiumRasterOverlays
[ 57%] Built target Cesium3DTilesSelection
[100%] Built target CesiumForUnityNative-Runtime
Install the project...
-- Install configuration: "Debug"
-- Up-to-date: /home/<user>/cesium-unity-samples/Packages/com.cesium.unity/native~/../Editor/./libCesiumForUnityNative-Runtime.so
-- Up-to-date: /home/<user>/cesium-unity-samples/Packages/com.cesium.unity/native~/../Editor/./libCesiumForUnityNative-Editor.so
```
now in unity i added the `cesium-unity-samples` project but with 2022.3.48f1 editor version (the 2021 one seems not work on arch anymore). logedin into cesium ion. Then added a `Blank 3D Tiles Tileset` on the gameobject `Cesium3DTileset` I switch to url and use my maps api url `https://tile.googleapis.com/v1/3dtiles/root.json?key=<my key>`
then I get following error:
```
[2024-10-01 23:49:28.695] [error] [TilesetJsonLoader.cpp:697] Error when parsing tileset JSON, error code Invalid value. at byte offset 0
UnityEngine.Debug:Log (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr) (at ./Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:13570)
Reinterop.ReinteropInitializer/ActionNativeFunction:Invoke () (at ./Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:10186)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()
```
in `/home/<user>/cesium-unity-samples/Packages/com.cesium.unity/native~/extern/cesium-native/Cesium3DTilesSelection/src/TilesetJsonLoader.cpp` in line 697
```cpp
...
rapidjson::Document tilesetJson;
tilesetJson.Parse(
reinterpret_cast<const char*>(responseData.data()),
responseData.size());
if (tilesetJson.HasParseError()) {
SPDLOG_LOGGER_ERROR(
pLogger,
"Error when parsing tileset JSON, error code {} at byte offset {}",
tilesetJson.GetParseError(),
tilesetJson.GetErrorOffset());
return TileLoadResult::createFailedResult(std::move(pCompletedRequest));
}
// Save the parsed external tileset into custom data.
// We will propagate it back to tile later in the main
// thread
TilesetContentLoaderResult<TilesetJsonLoader> externalTilesetLoader =
parseTilesetJson(
pLogger,
tileUrl,
tilesetJson,
tileTransform,
...
```
i change the error message parameter to tileUrl wich gave me the uri provided by the maps google api
```
https://tile.googleapis.com/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhc<some removal>PTYsaW1hZ2VyeV9lcG9jaD0xMDA5LGFsaWdubWVudF92ZXJzaW9uPVJPQ0tUUkVFXzk4OF9HT09HTEVfREFUVU1fMjAyNDA3MDRUMDc1M1pfZ2VuZXJhdGVkX2F0XzIwMjQwOTE3VDEyMDha.glb
```
this is a valid glb compressed Json file wich I checked with https://github.khronos.org/glTF-Validator/
the google maps API sayes somethng from:
```json
"extensionsUsed": [
"3DTILES_content_gltf"
],
"extensionsRequired": [
"3DTILES_content_gltf"
]
}
```
which I didnt investigated further.
It seems that the cesium plugin have an Issue decompressin glb files.
Does you have any idea how i can fix it?
johni
February 24, 2025, 1:20am
22
Thank you for helping out! I really appreciate it. I was able to fix the problem! Thank you so much!