Our team is attempting to include Cesium in a shipping-packaged game. Cesium compiles and works great while in-editor, but when we attempt to perform a shipping build, we get a number of unresolved external symbol errors errors related to slate. I’ve uploaded a build log here, highlighting the errors in question: https://pastebin.com/raw/NCMTJN7Y
I found a mention that the Cesium plugin requires the Unreal project to be packaged with VS 2017. This page was last updated a year ago, but how are we supposed to package a project if Unreal 5.3.2 doesn’t even support VS 2017?
On Windows, packaging the Cesium for Unreal plugin on Windows requires Visual Studio 2017. This means you must also build cesium-native with Visual Studio 2017 in order for plugin packaging to be successful. But if you’re not concerned with packaging, you can use Visual Studio 2019 exclusively.
I was able to resolve this by including the “Slate” and “SlateCore” modules in PublicDependencyModuleNames regardless of whether Target.bBuildEditor == true. I am able to package the project now in UE 5.3.2 (source build), Cesium 2.7.0 (from GitHub), and VS2022 (17.10.4).
If anyone on the Cesium team could still review this post and provide an explanation of why “Slate” and “SlateCore” were moved to only be included in editor builds, that would be really helpful. Without it I am unable to package Cesium. Looks like it happened in this commit: Tileset and dependency cleanup. · CesiumGS/cesium-unreal@f017bbd · GitHub
I’m glad you were able to resolve this, but I was not able to reproduce it locally using Windows and UE 5.3.2. Then again, I just use the released engine, rather than build it for myself.
Could something with building the engine yourself be causing some of your problems?
Thanks for your response. I think the issue is that the engine is compiled from source, but I don’t think anything specific to our process causes this issue. We followed the exact instructions provided by Epic to build the engine from source on multiple machines and saw this issue on all of them.
Since the change is relatively small and only involves the build system for Cesium, could the Cesium team incorporate this fix into their builds moving forwards?
I think the Slate modules are restricted to Editor builds for historical reasons. Long ago, we used a web browser control to display credits / attribution. Then, about two years ago, we switched to using Slate widgets, which is much lighter-weight. Slate became required in runtime builds at that time, but we didn’t update the module dependencies because we didn’t realize that we needed to. I’m not sure why other systems are happy to ignore this, while you’re seeing linker errors. But in any case, I agree those modules are required outside the Editor.
I wrote an issue for this:
We’d welcome a pull request with this change, if you’re up for it!