Skip to content

Prepare Engine (Linux)

BleuRaven edited this page Aug 9, 2026 · 24 revisions

Get sources from GitHub

Open console from /media/[USER]/MMVS_EngineFiles (Skip if it already exists)

git clone git@github.com:EpicGames/UnrealEngine.git

Prepare Files

Open console from the /media/[USER]/MMVS_EngineFiles/UnrealEngine folder or move to folder cd UnrealEngine Update local references with the latest changes from the server:

git fetch

Reset all local changes and switch branches:

git clean -fdx;
git reset --hard HEAD;
git stash clear;

Check is clean with:

git status

List available tags and update:

  • Press 'Space' to move to the bottom of the page.
  • Press the 'q' button to exit interactive mode.
git tag
git checkout 5.4.4-release

Prepare Linux

sudo apt update
sudo apt install mono-complete

Run the setup and project files generation scripts for Unreal Engine:

./Setup.sh;
./GenerateProjectFiles.sh ~vscode;
./Engine/Build/BatchFiles/Linux/SetupToolchain.sh;

Set Engine Config

For disabling git check open BuildConfiguration.xml

nano ./Engine/Saved/UnrealBuildTool/BuildConfiguration.xml

And replace its content with:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
  <ProjectFileGenerator>
    <Format>VisualStudioCode</Format>
  </ProjectFileGenerator>
  <SourceFileWorkingSet> 
    <Provider>None</Provider> 
    <RepositoryPath></RepositoryPath> 
    <GitPath></GitPath> 
  </SourceFileWorkingSet>
</Configuration>

For setting IDE on Linux open BaseEngine.ini

nano ./Engine/Config/BaseEngine.ini

And include the following:

[/Script/SourceCodeAccess.SourceCodeAccessSettings]
PreferredAccessor=VisualStudioCode

For speeding up Engine Compiling open BaseEngine.ini

nano ./Engine/Config/BaseEngine.ini

Search for WorkerProcessPriority and change it from -1 to 1

Build Engine

Use command

make

OR

  • Open "UE5.code-workspace"
  • Set Launch UnrealEditor (Development)
  • Run Build (Ctrl+F5)

Build UnrealLightmass

MMVS use CPU Lightmass.

./Engine/Build/BatchFiles/Linux/Build.sh UnrealLightmass Linux Development -verbose

External Engine Plugins

MMVS use some external plugins. The following plugin need to be installed in the engine, not in the project.

Please note: Fab store is not available on Linux... So you need download it on Windows first then copy the files in Linux. Discussion about Fab on Linux: https://forums.unrealengine.com/t/downloading-3rd-party-plugins-from-fab-in-linux/2086192

CesiumForUnreal

  • Install it from Fab in Unreal Engine 5.4 Fab link
  • then copy the folder "CesiumForUnreal_5.4" from Unreal Engine 5.4 to the build from source folder in /media/[USER]/MMVS_EngineFiles/UnrealEngine/Engine/Plugins/Marketplace

Now we will do an hot source edits. Fix crash error report on dedicated server

  1. Open /media/[USER]/MMVS_EngineFiles/UnrealEngine/Engine/Plugins/CesiumForUnreal/Source/CesiumRuntime/Private/ScreenCreditsWidget.cpp and replace:
UScreenCreditsWidget::UScreenCreditsWidget(
    const FObjectInitializer& ObjectInitializer)
    : UUserWidget(ObjectInitializer) {
  static ConstructorHelpers::FObjectFinder<UFont> RobotoFontObj(
      *UWidget::GetDefaultFontName());
  _font = FSlateFontInfo(RobotoFontObj.Object, 8);
}

with

UScreenCreditsWidget::UScreenCreditsWidget(
    const FObjectInitializer& ObjectInitializer)
    : UUserWidget(ObjectInitializer) {
#if UE_SERVER
  _font = FCoreStyle::GetDefaultFontStyle("Regular", 8); // Use default Slate font
#else
  static ConstructorHelpers::FObjectFinder<UFont> RobotoFontObj(
      *UWidget::GetDefaultFontName());
  _font = FSlateFontInfo(RobotoFontObj.Object, 8);
#endif
}

Add custom bounds for CesiumGltfPrimitiveComponent 2. Open /media/[USER]/MMVS_EngineFiles/UnrealEngine/Engine/Plugins/Marketplace/CesiumForUnreal/Source/CesiumRuntime/Private/CesiumGltfPrimitiveComponent.h and add in the class UCesiumGltfPrimitiveComponent

public:
	// Bound Custom Offset
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Tag|CesiumOverride")
	FVector BoundCustomOffset = FVector(0.0f, 0.0f, 0.0f);

	// Bound Custom Extend
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Tag|CesiumOverride")
	FVector BoundCustomExtend = FVector(0.0f, 0.0f, 0.0f);

	// Set custom bound
	UFUNCTION(BlueprintCallable, Category = "Tag|CesiumOverride")
	void SetCesiumBoundOverride(FVector CustomOffset, FVector CustomExtend) {
		BoundCustomOffset = CustomOffset;
		BoundCustomExtend = CustomExtend;
	}
  1. Open /media/[USER]/MMVS_EngineFiles/UnrealEngine/Engine/Plugins/Marketplace/CesiumForUnreal/Source/CesiumRuntime/Private/CesiumGltfPrimitiveComponent.cpp and replace:
FBoxSphereBounds UCesiumGltfPrimitiveComponent::CalcBounds(
	const FTransform& LocalToWorld) const {
  if (auto bounds = calcBounds(*this, LocalToWorld)) {
	return *bounds;
  }
  return Super::CalcBounds(LocalToWorld);
}

with

FBoxSphereBounds UCesiumGltfPrimitiveComponent::CalcBounds(
	const FTransform& LocalToWorld) const {
  if (auto bounds = calcBounds(*this, LocalToWorld)) {
	FBoxSphereBounds expandedBounds = *bounds;
	expandedBounds.Origin += BoundCustomOffset; // Move center with offset (Override)
	expandedBounds.BoxExtent += BoundCustomExtend; // Extend box with custom extend (Override)
	return expandedBounds;
  }
  return Super::CalcBounds(LocalToWorld);
}

Fix dynamic material that loose reference when using LifecycleEventReceiver 4. Open /media/[USER]/MMVS_EngineFiles/UnrealEngine/Engine/Plugins/Marketplace/CesiumForUnreal/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp and comment the lines

//pBaseMaterial = pMaterialForGltfPrimitive->Parent.Get(); // LINE 3205
//pUserDesignatedMaterialAsDynamic = nullptr; // LINE 3207

Assets Cleaner - Project Cleaning Tool

  • Install it from Fab in Unreal Engine 5.4 Fab link
  • Then copy the folder "AssetsCleaner" from Unreal Engine 5.4 to the build from source folder in /media/[USER]/MMVS_EngineFiles/UnrealEngine/Engine/Plugins/Marketplace

Open Editor

./Engine/Binaries/Linux/UnrealEditor

If Unreal crash in Wayland session, you can try with:

SDL_VIDEODRIVER=x11 ./Engine/Binaries/Linux/UnrealEditor

More Infos

https://github.com/EpicGames/UnrealEngine https://youtu.be/Pt8oudvCPUA?si=CVZyrb8ixdmLFTGG https://voithos.io/articles/building-unreal-engine-from-source-for-vscode/

Clone this wiki locally