-
Notifications
You must be signed in to change notification settings - Fork 38
Prepare Engine (Windows)
- Dev Notes: Dev Notes
- Linux: Prepare Engine (Linux)
Open console from M:\MMVS_EngineFiles (Skip if it already exists)
git clone git@github.com:EpicGames/UnrealEngine.git
Open console from the M:\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
Run the setup and project files generation scripts for Unreal Engine:
.\Setup.bat
.\GenerateProjectFiles.batFor disabling git check open BuildConfiguration.xml
notepad .\Engine\Saved\UnrealBuildTool\BuildConfiguration.xml
Replace its content with:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<SourceFileWorkingSet>
<Provider>None</Provider>
<RepositoryPath></RepositoryPath>
<GitPath></GitPath>
</SourceFileWorkingSet>
</Configuration>For speeding up Engine Compiling open BaseEngine.ini
notepad .\Engine\Config\BaseEngine.ini
Search for WorkerProcessPriority and change it from -1 to 1
Use command
.\Engine\Build\BatchFiles\Build.bat UnrealEditor Win64 Development -waitmutex
OR
- Open "UE5.sln"
- Set Development Editor, Win64, UE5
- Right Click Solution -> Build Solution
Then
- Download the latest Clang for Unreal Engine. (Cross-Compile Toolchain) Restart if first install or changes https://dev.epicgames.com/documentation/en-us/unreal-engine/linux-development-requirements-for-unreal-engine?application_version=5.4
MMVS use CPU Lightmass.
./Engine/Build/BatchFiles/Build.bat UnrealLightmass Win64 Development -verbose
MMVS use some external plugins. The following plugin need to be installed in the engine, not in the project.
Visual Studio Integration Tool Status (v2.5 for Unreal Engine 5.4) <- Can be installed from Visual Studio in the "Unreal Engine Integration Configuration" page.
- Install it from GitHub in Unreal Engine 5.4 GitHub link Install the version v2.21.0 for Unreal Engine 5.4
- then extract and copy the folder "CesiumForUnreal" to the source build in
M:\MMVS_EngineFiles\UnrealEngine\Engine\Plugins
Now we will do an hot source edits. Fix crash error report on dedicated server
- Open
M:\MMVS_EngineFiles\UnrealEngine\Engine\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\ScreenCreditsWidget.cppand 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 M:\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;
}- Open
M:\MMVS_EngineFiles\UnrealEngine\Engine\Plugins\Marketplace\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumGltfPrimitiveComponent.cppand 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 M:\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- Install it from Fab in Unreal Engine 5.4 Fab link
- then copy the folder "AssetsCleaner" from Unreal Engine 5.4 to the source build in
M:\MMVS_EngineFiles\UnrealEngine\Engine\Plugins\Marketplace
./Engine/Binaries/Win64/UnrealEditor.exe