Syncing binaries#
This module covers the same functionality as Unreal Game Sync. It is applicable to C++-based projects.
In a larger team, you don’t want everyone to have to compile the game, or the entire editor when building from source. This wastes unnecessary time. Instead, you can build the necessary binaries once and share them with your team. This is what Unreal Game Sync does, but it only works with Perforce. Anchorpoint allows you to do this with Git.
It works for game binaries when your team uses the Unreal Editor from the Epic Games Launcher, as well as when building the Unreal Editor from source.
How team members will pull game and editor binariesSetup#
How setup the binary sync actionCase 1: Using the Unreal Editor from the Epic Games Launcher#
For this setup you will only need a storage location for your game binaries. This can be a shared folder such as a Google Drive (your team members need the Google Drive desktop app) or a NAS that everyone has access to or an S3 storage solution like AWS S3, Mega S4 or Backblaze B2. The second solution requires a 15 minute setup but it’s more cost effective and easier for your team members to deal with as they don’t need to configure anything.
1. Setup the binary sync Action in Anchorpoint#
These settings are applied for your whole team.
In Anchorpoint, go to “Workspace Settings” / “Actions” and enable “Unreal Binary Sync”
On the action, click on “Settings”
Set the tag pattern This is basically the base name of the tag. So if you have tagged your binary with “Game-1” for example, just type in “Game” as Anchorpoint will only look at the base name of the tag.
Set the “Binary Location” if it’s a folder on a NAS or Google Drive or a S3 storage solution. In case you pick S3 Cloud Storage, you have to add the S3 credentials.
A note on the tag pattern We are using Git tags to mark Git commits that have a binary attached. Commits with content only (e.g. by adding a new asset to the game) don’t require to build new game binaries, so they won’t have any tag. Git tags have to be unique, that’s why we add a number to them, such as Game-1, Game-2, Game-3 etc.
2. Build and push the binaries#
You can build game binaries locally or via a build server. This example shows how to do that locally.
In your Anchorpoint project, click on “Project Settings” / “Unreal”
Enable “Add Binary Push Button” This will add a button to the sidebar. You need to refresh the project by closing and reopening it.
Back in your project settings, set the path to your Unreal Engine installation (e.g. C:\Program Files\Epic Games\UE_5.6)
You should see a button “Push Binaries” in the left sidebar. Press it.
3. Pull the binaries#
Now, your team member needs to consume the shared binaries.
Join the Git repository if you have not done it yet
Click the “Pull Binaries” button and wait until the sync is done
Start your Unreal Engine project
If you want you can also run the binary pull after each new Git pull. It will only pull binaries when it has to. You can also specify that the Unreal Editor will open automatically once the binaries are successfully pulled. For that, open the “Project Settings” / “Unreal” and adjust the corresponding settings.
Case 2: Building the Unreal Editor from source#
Prerequisites#
The Unreal Engine source code from Epic Games on GitHub. You will need to get an account from the Epic Games organization.
A file sharing solution for your binaries. This can be a S3 bucket like AWS S3 or Backblaze B2 or for smaller teams a shared folder on a NAS or Google Drive
In Anchorpoint, activate the “Unreal Binary Sync” Action under “Workspace Settings” / “Actions”
A proper build pipeline that allows you to add git tags and configure the name and location of the zip file that contains the editor binaries. Code snippets are shown below.
1. Get the Unreal Engine source code#
Get the Unreal Engine source from GitHub and set up your project properly according to Epic’s instructions. This includes running setup.bat and generating the project files, so that you can compile and run the Unreal Editor from source.
Set up your project structure by removing the sample content and adding your game project content.
2. Create a new Anchorpoint project and adjust your .gitignore#
Create a new Anchorpoint project with a corresponding Git repository. Do not use the .gitignore template provided with Anchorpoint. This template is used for Unreal projects that use the editor from the Epic Games Launcher.
Once the project is created, you will need to customize the .gitignore that comes from GitHub. Add these rules at the end:
### Custom adjustments ###
# Allow everything in GitDependencies, otherwise setup.bat will not run
!/Engine/Binaries/DotNET/GitDependencies/**
# Allow the uprojectdir file
!Default.uprojectdirs
#ignore .ap folder
/.ap
# Precompiled Binary lists
extracted_binaries.txt
/Engine/Build/PrecompiledBinaries.txt
# Allow the game folder. It will use it's own .gitignore. Use your own game folder name here
!Samples/
!Samples/**
Replace “Samples” with your game folder. This rule will allow everything in your game folder. You need to use a different .gitignore that only applies to your game folder. You can use this one.
3. Commit and push your changes#
You can now commit and push your changes in Anchorpoint to your Git server.
4. Build and distribute your binaries#
Create your build using the Unreal Build Tool (UBT). Download this configuration and unzip the folder “Anchorpoint” inside YOURGAMEPROJECTFOLDER/Build
Then, open the PowerShell script MoveAndRenameWithCommit.ps1 and set the target folder, where all your ZIP files will be placed.
Example Usage
".\Engine\Build\BatchFiles\RunUAT.bat" BuildGraph -Script="Samples/Games/YOURGAMEPROJECTFOLDER/Build/Anchorpoint/Anchorpoint.xml" -Target="Upload Anchorpoint Binaries" -set:EditorTarget=LyraEditor -project="Samples/Games/Lyra/Lyra.uproject"
Make sure that you are in the Git repository. The build configuration runs two PowerShell scripts. The first TagEditorIncrement.ps1 is setting the correct Git tag to the commit, from which the binary was created. The second MoveAndRenameWithCommit.ps1 is placing the binary out of the project directory and moving and renaming it to your shared folder. If you use an S3, you have to adjust the script that it uploads the binaries to an S3 bucket.
5. Setup the binary sync Action in Anchorpoint#
These settings are applied for your whole team.
In Anchorpoint, go to “Workspace Settings” / “Actions” and enable “Unreal Binary Sync”
On the action, click on “Settings”
Set the tag pattern This is basically the base name of the tag. So if you have tagged your binary with “Editor-1” for example, just type in “Editor” as Anchorpoint will only look at the base name of the tag.
Set the “Binary Location” if it’s a folder on a NAS or Google Drive or a S3 storage solution. In case you pick S3 Cloud Storage, you have to add the S3 credentials.
6. Pull the binaries and run your project#
Now you (or your team member who will be using the binaries) can download the binaries so that Anchorpoint can unpack them and run the Unreal Editor.
You should see the “Pull Binaries” button on the left sidebar. Before you click it, do the following first:
Join the Git repository and download all the project files
Open the “Project Settings” and pick “Unreal”
If you are distributing the binaries via a shared folder, you have to tell Anchorpoint where this folder is located. Every member in your team has to do that.
Pick your launch project if you want that the Unreal Editor will be opened after a successful sync
Finally, close the Project Settings and click the “Pull Binaries” button in the left sidebar. This will trigger the sync. You may have to accept a pop-up on Windows if you have enabled the “Sync Setup Dependencies” option for installing UE prerequisites.
Debugging
If something is not working as it should, open the console for troubleshooting. Never put your Unreal Engine game project in a subfolder called “Engine” or “Source”.
Technical note#
Binaries, that are extracted, are registered in a text file called “extracted_binaries.txt”. This file is ignored by the .gitignore.
You can find more information in the readme of the Binary Sync Action.