Compiling unreal plugin from source on linux

downloaded cesium-unreal-1.2.0.tar.gz

On Ubuntu, not sure

  1. where to compile it — it compiled successfully in its own directory next to the Unreal directory

  2. how to install the plugin into the Unreal Engine
    – still not sure how to properly install the plugin,
    – tried installing by - creating a symbolic link to it - in /Plugins in a under MyProject/
    – UnrealEngine found it in when loading MyProject,
    but complained because it failed to find CesiumRuntime and CesiumEditor
    it then tried to load mono to create it, but failed

SO… Fixed the problem, when it fails to find CesiumRuntime and CesiumEditor
and tries to compile it for you using mono, and asks you to close Unreal and compile from the “IDE”

just close Unreal, go to the top directory where you compiled from, and simply

make UE4Editor

that will launch mono to compile and link and fix the cesium unreal plugin modules
CesiumRuntime and CesiumEditor

Yesssss

  1. how to successfully export a runtime “package” with Cesium for Unreal to run on Linux

thanks for any help

Hi @dariusclynes

Is there a reason you are trying to compile from source instead of downloading the pre-built packaged zip from Releases · CesiumGS/cesium-unreal · GitHub?

The full instructions are coming in Add developer setup instructions by javagl · Pull Request #384 · CesiumGS/cesium-unreal · GitHub, but here is a summary:

  1. Follow the instructions to compile Cesium Native from GitHub - CesiumGS/cesium-unreal: Bringing the 3D geospatial ecosystem to Unreal Engine.
  2. You can either point your Unreal Project to the development directory, or package the plugin. To package the plugin, you have to run UE_4.26/Engine/Build/BatchFiles/RunUAT.sh BuildPlugin -Plugin="./CesiumForUnreal.uplugin" -Package="../packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Linux. This will create the packaged plugin in ../packages/CesiumForUnreal that you can copy to your Engine Plugins directory.
1 Like

Thank you so much for responding. Thanks for the pointers.

Hi Shehzan,

thanks for your reply. Unfortunately I havew not found any compiled linux binaries for running the plugin.
BUt i successflly compiled from source and installed the plugin in Unreal for Linux UE4.

But trying to create a runtime package has been difficult. Once it succeded , but when trying to run it crashed.

We would love to demonstrate the cesium for unreal at the end of this week.
I have a log showing the runtime error on a successful runtime package

and also log showing a packaging error on the linux version

maybe I could send it to you by email, or leave it somewhere here.
Thank you

Darius Clynes

@dariusclynes Under the releases link in my previous post, all platforms are bundled into the same zip. You download and extract this into your engine directory. You can then open a project like Cesium for Unreal Samples, and try to package that to confirm success.

I can’t really comment on your specific source-compiled setup because I don’t know the versions you are using for compiler etc. UE + Linux can be temperamental as you probably already know.

Are you able to successfully run it in the editor?

To answer your question i am using cesium 1.2.1 pluguin with 4.26.2 Unreal Engine<
yes I can get the cesium plugin to run in the UE4Editor

very nicely,

when exporting, creating a package the package says it is successful, but the reulting stand alsone package crashes

I suggest trying v1.3.1 of the plugin. It’s very likely that crash on startup of the packaged project has been fixed.

~/workspace/UnrealEngine-4.26/Engine/Build/BatchFiles$ bash RunUAT.sh BuildPlugin -Plugin="…/UnrealEngine-4.26/Engine/Plugins/CesiumForUnreal/CesiumForUnreal.uplugin" -Package="…/UnrealEngine-4.26/packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Linux

Running AutomationTool…

Fixing inconsistent case in filenames.
Setting up Mono
xbuild Source/Programs/AutomationTool/AutomationTool.csproj /p:Configuration=Development /p:Platform=AnyCPU /verbosity:quiet /nologo /p:NoWarn=1591 /property:AutomationToolProjectOnly=true /p:TargetFrameworkProfile=
Start UAT: mono AutomationTool.exe BuildPlugin -Plugin=…/UnrealEngine-4.26/Engine/Plugins/CesiumForUnreal/CesiumForUnreal.uplugin -Package=…/UnrealEngine-4.26/packages/CesiumForUnreal -CreateSubFolder -TargetPlatforms=Linux
Parsing command line: BuildPlugin -Plugin=…/UnrealEngine-4.26/Engine/Plugins/CesiumForUnreal/CesiumForUnreal.uplugin -Package=…/UnrealEngine-4.26/packages/CesiumForUnreal -CreateSubFolder -TargetPlatforms=Linux -compile
Dependencies are up to date (0.092s). Skipping compile.
WARNING: Failed to delete directory ‘/home/boundary/workspace/UnrealEngine-4.26/packages/CesiumForUnreal/HostProject’
ERROR: System.UnauthorizedAccessException: Access to the path “/home/boundary/workspace/UnrealEngine-4.26/packages/CesiumForUnreal/HostProject/HostProject.uproject” is denied.
at System.IO.FileStream…ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.FileStream…ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream…ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x0001c] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter…ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter…ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter…ctor (System.String path, System.Boolean append, System.Text.Encoding encoding) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0
at (wrapper remoting-invoke-with-check) System.IO.StreamWriter…ctor(string,bool,System.Text.Encoding)
at System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.File.WriteAllText (System.String path, System.String contents) [0x00007] in <98fac219bd4e453693d76fda7bd96ab0>:0
at BuildPlugin.CreateHostProject (Tools.DotNETCommon.FileReference HostProjectFile, Tools.DotNETCommon.FileReference PluginFile) [0x0002a] in <83588defaa3046b0a43b375c2ce095c3>:0
at BuildPlugin.ExecuteBuild () [0x001f3] in <83588defaa3046b0a43b375c2ce095c3>:0
at AutomationTool.BuildCommand.Execute () [0x00001] in <3a96dedbe001492dafabc439c8dff0c9>:0
at AutomationTool.Automation.Execute (System.Collections.Generic.List1[T] CommandsToExecute, System.Collections.Generic.Dictionary2[TKey,TValue] Commands) [0x0007c] in <3a96dedbe001492dafabc439c8dff0c9>:0
at AutomationTool.Automation.Process (System.String Arguments, UnrealBuildTool.StartupTraceListener StartupListener) [0x00286] in <3a96dedbe001492dafabc439c8dff0c9>:0
at AutomationTool.Program.MainProc (System.String Arguments, UnrealBuildTool.StartupTraceListener StartupListener) [0x00001] in <60c8e96c4e794adcade69f7f5a8b77f3>:0
at AutomationTool.Program+<>c__DisplayClass1_0.b__2 () [0x00000] in <60c8e96c4e794adcade69f7f5a8b77f3>:0
at AutomationTool.InternalUtils.RunSingleInstance (System.Func`1[TResult] Main) [0x000a0] in <3a96dedbe001492dafabc439c8dff0c9>:0
at AutomationTool.Program.Main (System.String Arguments) [0x0020a] in <60c8e96c4e794adcade69f7f5a8b77f3>:0
(see /home/boundary/Library/Logs/Unreal Engine/LocalBuildLogs/Log.txt for full exception trace)
AutomationTool exiting with ExitCode=1 (Error_Unknown)
RunUAT ERROR: AutomationTool was unable to run successfully.