1
\$\begingroup\$

Problem

VSCode on my env from a project, setting of which is auto-generated from Unreal Engine, tries to build the code of Unreal Engine itself, which includes more than 2,000 files and taking forever.

I assume (re-)building UE itself from a .uproject is not needed, or even wrong. In a udemy course I'm taking the lecturer showed the build process where only 9 files are built and took only a minute.

What I've done

  • On a .uproject on UE5, clicked Tools -> New C++ Class then chose Actor.

  • Tools -> Open Visual Studio Code, which popped up VSC GUI after a while of generating the VSC setting.

  • On VSC, Terminal -> Run Build Task then chose %PROJ-NAME%Editor Linux Development Build (instruted to do this in the MOOC course on udemy)

    • On the "Explorer" pane on the left on VSC, I do see a folder UE5, which references to the git repo of Unreal Engine mentioned above. This path sits OUTSIDE of this VSC project, and I didn't do anything to include it in the VSC project.
    • I do see indeed the UE5 folder in VSC setting.
      $ head -20 UnrealLearningKit.code-workspace { "folders": [ { "name": "UnrealLearningKit", "path": "." }, { "name": "UE5", "path": "/home/noodler/pg/unreal-engine/UnrealEngine" } ], "settings": { "typescript.tsc.autoDetect": "off", "npm.autoDetect": "off", "terminal.integrated.env.linux": { "PATH": "/home/noodler/pg/unreal-engine/UnrealEngine/Engine/Binaries/ThirdParty/DotNet/8.0.300/linux-x64:${env:PATH}", "DOTNET_ROOT": "/home/noodler/pg/unreal-engine/UnrealEngine/Engine/Binaries/ThirdParty/DotNet/8.0.300/linux-x64", : 
    First lines on VCS terminal after the build is triggered.
    Executing task in folder UnrealEngine: Engine/Build/BatchFiles/Linux/Build.sh UnrealLearningKitEditor Linux Development '/home/noodler/link/noodler/prooving_grounds/mooc/udemy_unreal-engine-cpp/UnrealLearningKit 5.1 5.5/UnrealLearningKit.uproject' -waitmutex Setting up bundled DotNet SDK Running command : dotnet Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll UnrealLearningKitEditor Linux Development /home/noodler/link/noodler/prooving_grounds/mooc/udemy_unreal-engine-cpp/UnrealLearningKit 5.1 5.5/UnrealLearningKit.uproject -waitmutex Log file: /home/noodler/pg/unreal-engine/UnrealEngine/Engine/Programs/UnrealBuildTool/Log.txt Using 'git status' to determine working set for adaptive non-unity build (/home/noodler/pg/unreal-engine/UnrealEngine). Building UnrealLearningKitEditor... [Upgrade] [Upgrade] Using backward-compatible include order. The latest version of UE has changed the order of includes, which may require code changes. The current setting is: [Upgrade] IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_3 [Upgrade] Suppress this message by setting 'IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_5;' in UnrealLearningKitEditor.Target.cs. [Upgrade] Alternatively you can set this to 'EngineIncludeOrderVersion.Latest' to always use the latest include order. This will potentially cause compile errors when integrating new versions of the engine. [Upgrade] Determining max actions to execute in parallel (12 physical cores, 16 logical cores) Executing up to 12 processes, one per physical core Requested 1.5 GB memory per action, 14.91 GB available: limiting max parallel actions to 9 Using Unreal Build Accelerator local executor to run 2123 action(s) Storage capacity 40Gb ---- Starting trace ---- UbaSessionServer - Disable remote execution (remote sessions will finish current processes) ------ Building 2123 action(s) started ------ 

    (For some reasons the build often gets stuck at this point but eventually moves on.)

Attempt to fix (don't seem to be effective)

  • Manually removed the entry of UE5 in folders section in the .code-workspace file, then I did see the UE5 folder disappeared on the folder explorer pane on VSC. Then re-ran the build from VSC but I still saw the same many amount of files to be built.
  • Deleted the .code-workspace file, re-generated VSC setting from UE5 but I see the same.

Environment

  • Unreal Engine 5.5.1, Ubuntu 22.04
    • UE is built from source locally and the git repo is still present on the file system, the UE executed from the built binary inside the same git local repo (UPDATE 20250117) that is moved to another directory.
  • VSCode 1.96.2

UPDATE-1. I confirmed with a prebuilt UE5 (binary files downloaded from unrealengine.com), the issue in question does NOT occur -- With the same .uproject (when I opened the same project from a prebuilt UE5, it automatically made a copy and opened it, so it's a copy), which is a barebone project with a set of newly created skeleton .h and .cpp files, I saw only 3 files were built.

To move on I'll stick with this setting, but the problem in question in unresolved.

\$\endgroup\$
1
  • \$\begingroup\$ Once it completes building and linking (might take an hour), if you change one of your C++ files, does it build the whole engine again? It should not because of incremental builds. But using "Clean" or "Rebuild" options would make it do a full build again. \$\endgroup\$ Commented Jan 15 at 4:53

2 Answers 2

0
\$\begingroup\$

As I've updated the Environment section in my OP, I found that the issue has only been seen when the Unreal Engine that was locally built from source is moved to another directory and run from there i.e. when Unreal Engine was executed from the same path of where it was built to, this issue has not been seen (I only see 1 item to be compiled in the same barebone project mentioned in OP).

(Since I'm still new, I don't know why moving the built artifact to another path causes this issue. I've noticed though that there are many many many locations inside the built artifact of Unreal Engine where the absolute path to resource/files of Unreal Engine is hardcoded. So, moving the path of built Unreal Engine may be a bad idea as of UE5.5.1.)

\$\endgroup\$
0
\$\begingroup\$

When you build UE from source, the path where you build it is absolutely important. In general, choose a good location for it (with a short directory prefix like C:/UE_5.5 or /opt/UE_5.5), build there and leave it there.

If for some reason you do have to move it after you build it, then you should run ./GenerateProjectFiles.sh again from the new location, otherwise you will have project files pointing to the old location every time you try to build.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.