This plugin is originally based on the Project Borealis' UEGitPlugin Fork. It has been heavily modified to use the Friendshipper HTTP API instead of shelling out to git directly, though some operations still remain.
This means that Friendshipper must be running for source control operations to work - this is a strict requirement of the plugin. See this documentation for more information on how Friendshipper source control works.
Copy the entire repo (without the .git directory) into your project's Plugins/
folder, and enable the plugin in your .uproject
file like so:
{
"Plugins":
[
{
"Name": "FriendshipperSourceControl",
"Enabled": true
}
]
}
Note: This plugin has a dependency on UnrealOpenTelemetry, which is published here.
This plugin requires explicit file attributes for *.umap
and *.uasset
, rather than other approaches of using wildcards for the content folder (Content/**
).
For an example, see the Project Borealis .gitattributes
.
You may also want to see their .gitignore
.
- The plugin makes the assumption that files are always explicitly added. We made this decision because it is beneficial for performance and our workflows. In
Config/DefaultEditorPerProjectUserSettings.ini
[/Script/UnrealEd.EditorLoadingSavingSettings]
bSCCAutoAddNewFiles=False
Epic Games added Status Branches in 4.20, and this plugin has implemented support for them. See Workflow on Fortnite for more information. Here is an example of how you may apply it to your own game.
- Make an
UUnrealEdEngine
subclass, preferrably in an editor only module, or guarded byWITH_EDITOR
. - Add the following:
#include "ISourceControlModule.h"
#include "ISourceControlProvider.h"
void UMyEdEngine::Init(IEngineLoop* InEngineLoop)
{
Super::Init(InEngineLoop);
// Register state branches
const ISourceControlModule& SourceControlModule = ISourceControlModule::Get();
{
ISourceControlProvider& SourceControlProvider = SourceControlModule.GetProvider();
// Order matters. Lower values are lower in the hierarchy, i.e., changes from higher branches are assumed
// to be automatically merged down via the CI pipeline.
// With this paradigm, the higher the index of the branch, the stabler it is.
const TArray<FString> Branches {"origin/main", "origin/release"};
SourceControlProvider.RegisterStateBranches(Branches, TEXT("Content"));
}
}
- Set to use the editor engine in
Config/DefaultEngine.ini
(make sure the class name isMyUnrealEdEngine
for a class calledUMyUnrealEdEngine
!):
[/Script/Engine.Engine]
UnrealEdEngine=/Script/MyModule.MyEdEngine
See the Project Borealis documentation for more information about Status Branches.
To connect Unreal to Friendshipper, select the Connect to Revision Control
option in the lower right hand corner Revision Control
menu. From the Provider
dropdown in the dialog, select Friendshipper
. You should see the settings get automatically filled out with your user info if Friendshipper is running and has been setup correctly.
Submit Content
leverages the Friendshipper Quick Submit flow, which allows users to submit changes without having latest changes. This unlocks critical workflow needs for users in larger studios, where lots of changes are being merged