Unreal Game Sync (UGS) precompiled binaries crashing on startup - source control guidelines with UGS


I’m having an issue running pre-compiled editor binaries after syncing with UGS, and some guidance would be very much appreciated!

The editor crashes immediately, and after inspecting crash logs, it looks like it’s failing to load some ThirdParty dlls (crash log is at the bottom of this post).

I think the issue is probably that I haven’t submitted [FONT=courier new]/Engine/Binaries/ThirdParty to perforce, but many online resources have suggested I do not commit any binaries. This also just makes sense to me - the point of using UGS is to bundle up required binaries for artists. Does this exclude ThirdParty binaries?

If this is the case, then my main question is: When using UGS, what needs to be added to perforce manually, and what is packaged in the build?

Eventually, I plan on creating a separate perforce stream for artists and programmers, which will filter out files as required. But first, I just need to get a pre-compiled build running at all and figure out file dependencies.

Here’s some more context:

I’ve managed to set up most of the UGS systems required. The launcher can pull the latest UnrealGameSync.exe build from perforce, the metadata server is running and connects properly, I can open my project, and I can build the editor using RunUAT.bat and BuildGraph.

I’ve pulled the editor source from github, and can build it in Visual Studio. I’m using Visual Studio 2019, so had to update the toolchain to use version v14.22 manually, but I can now build and run the editor from vs2019.

My project setup looks like this:
[FONT=courier new]UnrealEngine/
– Engine/
– FeaturePacks/
– LocalBuilds/
– Samples/
– MyGame/
– Templates/
– <.bat, .sln, etc files>

To build and submit the engine, I’m using the following command from the [FONT=courier new]UnrealEngine/MyGame/ directory (after setting up the [FONT=courier new]uebp_USER and [FONT=courier new]uebp_PORT env vars to point to my perforce server)

..\Engine\Build\BatchFiles\RunUAT.bat BuildGraph ^
  -Script=Engine/Build/Graph/Examples/BuildEditorAndTools.xml ^
  -Target="Submit To Perforce for UGS" ^
  -set:EditorTarget=MyGameEditor ^
  -set:ArchiveStream=//depot/dev-binaries ^
  -p4 ^

This is pulled directly from the UGS Reference docs. It correctly builds and publishes the editor binaries to the perforce server under [FONT=courier new]//depot/dev-binaries/++depot+main-Editor.zip

After setting up the [FONT=courier new]UnrealEngine/MyGame/Build/UnrealGameSync.ini file correctly, I can then use UGS to sync and unpack the editor correctly in another workspace with the “Sync Precompiled Editor” option turned on.

This will download the engine and place all my files in the correct locations.

However, when I then try to open the editor, it will crash on startup. Here’s the output from [FONT=courier new]UnrealEngine/Engine/Saved/Crashes/_0000/UE4.log

[FONT=courier new]Not using cached read wrapper
Started task graph with 5 named threads and 35 total threads with 3 sets of task threads.
Stats thread started at 0.071804
Failed to load GFSDK_Aftermath_Lib.x64.dll
Failed to load ‘…/…/…/Engine/Binaries/ThirdParty/nvTextureTools/Win64/nvtt_64.dll’ (GetLastError=126)
File ‘…/…/…/Engine/Binaries/ThirdParty/nvTextureTools/Win64/nvtt_64.dll’ does not exist
Failed to load ‘…/…/…/Engine/Binaries/ThirdParty/libsndfile/Win64/libsndfile-1.dll’ (GetLastError=126)
File ‘…/…/…/Engine/Binaries/ThirdParty/libsndfile/Win64/libsndfile-1.dll’ does not exist
Failed to load Sound File dll
LibSoundFile failed to load. Importing audio will not work correctly.
Failed to load ‘…/…/…/Engine/Binaries/ThirdParty/ICU/icu4c-53_1/Win64/VS2015/icudt53.dll’ (GetLastError=126)
File ‘…/…/…/Engine/Binaries/ThirdParty/ICU/icu4c-53_1/Win64/VS2015/icudt53.dll’ does not exist
Windows GetLastError: The operation completed successfully. (0)

Again, this looks like it’s just missing some ThirdParty libraries. Any help is appreciated!

I’ve tried including more binary files (Engine/Binaries/ThirdParty, Engine/Plugins, etc.) to perforce. This causes issues with Setup.bat since these files are pulled, but write-protected. This also could cause conflicts and issues if devs need to rebuild third party tools from source.

At this point, the only route I can see to make this work is to find all the required binaries manually and then update the build script to copy those to the precompiled output.

It’s a shame that all posts I’ve found about UnrealGameSync end in “well, after a bunch of wasted time, I just ended up using installed builds and not using UGS”. There is a lot of missing info about UGS, and some support from Epic would be greatly appreciated.

Alright, another update. I now see that many of these binaries are synced from GitDependencies.exe, which is run from Setup.bat. So maybe I can rely on that tool to pull down the third-party binaries?

I looked at the source for the GitDependencies project and saw that the tool looks for [FONT=courier new]*.gitdeps.xml files. There’s one large file in the project called [FONT=courier new]Engine/Build/Commit.gitdeps.xml which seems to contain all of the third party binaries and a bunch of source files for plugins, etc.

So, I’m going to remove the the binaries from perforce then just add these files:

[FONT=courier new]Engine/Binaries/GitDependencies.exe
[FONT=courier new]Engine/Build/Commit.gitdeps.xml
[FONT=courier new]Engine/Extras/Redist/en-us/UE4PrereqSetup_x64.exe

I’ll build and zip up the bins for UGS again, then use UGS to pull and unzip them again, run setup.bat, and see where I’m at.

I ended up restarting the process. I pulled the engine from github and added all the following files and folders to perforce:

[FONT=courier new]UnrealEngine/ [FONT=courier new]Engine/Binaries/GitDependencies.exe

[FONT=courier new]Engine/Build/



After this, I ran Setup.bat and GenerateProjectFiles.bat. I then built the engine, and created a new project. After creating a new project I added the following folders to perforce:

[FONT=courier new]UnrealEngine/ [FONT=courier new]MyGame/Config/

It seems to be building properly now. I will be testing compiled builds if this works correctly, and will report back

Alright, everything seems to be working now. The core issue in all of this is I didn’t realize how much “Setup.bat” did. It handles downloading third party libraries, etc. So I just needed to commit [FONT=courier new]Engine/Binaries/GitDependencies.exe and ask artists to run Setup.bat before the first load.

There was one final issue I ran into. I’m using Unreal 4.23, and by default it doesn’t include a dll that Niagara depends on (specifically [FONT=courier new]UE4Editor-ShaderFormatVectorVM.dll). This causes a missing dll startup error for precompiled builds.

To fix this issue, all I needed to do was add a dependency to the NiagaraEditor in [FONT=courier new]MyGame/Source/MyGame/MyGame.Build.cs

[FONT=Courier New]PublicDependencyModuleNames.AddRange(new string] {

"HeadMountedDisplay"[FONT=Courier New]*,

"NiagaraEditor"*[FONT=Courier New] [FONT=Courier New]// added this dependency


This ensured the niagara dependencies were included in the precompiled binaries.

Hopefully this thread can help others to get started with UnrealGameSync :slight_smile:

@rvierich Hey! I’m in the process of trying to do the same thing. Any chance you could share the .p4ignore you use for the engine?