This is the official Unity Version Control (formerly Plastic SCM) plugin for Unreal Engine 5 (UE 5.0 to 5.5) with previous releases also supporting UE4.27.
As a general rule, the Fab and GitHub versions of the plugin will always be the most up-to-date and recent versions. They're easier for us to patch by applying a hotfix, in case a bug is raised and something broken must be fixed quickly.
However, you can of course still use the "Plastic SCM" in-engine integration in Unreal.
This plugin is not intended to replace the Desktop Client or command line interface "cm". It is a complementary tool improving efficiency in your daily workflow with assets in Editor.
It tracks status of assets, most notably locks, brings common source control tasks inside the Editor, including updating, branching and merging, and provides visual diffing of Blueprints. It also helps import an existing Unreal Project into source control in a simple operation, with appropriate ignore.conf file. Since the Unreal Editor does not manage C++ source code, but only assets, the plugin is especially useful for tech designers, level designers and artists in general.
Quick tour "Branching with Unity Version Control (Plastic SCM) in Unreal Engine 5" on YouTube:
Having a version of "Plastic SCM" integrated in-Engine helps with discoverability and it is the easiest way to get started with Unity Version Control. However the integrated version will always be lagging behind the latest release in Github and Fab.
As a general rule, the Fab and GitHub versions of the plugin will always be the most up-to-date and recent versions. They're easier for us to patch by applying a hotfix, in case a bug is raised and something broken must be fixed quickly.
In Fab, the Unity Version Control plugin supports Engine Versions 5.0 to 5.5
Building from sources enable you to test features before they are released, debug issues, and contribute. It's required if you have your own fork of Unreal Engine.
If your project is already a C++ project, you only have to re-generate Visual Studio project files (step 4 below) and the plugin will get rebuilt the next time you compile your project.
Else, if you want to rebuild the plugin for a Blueprint project:
To release and redistribute the plugin, zip the Plugins folder. But before that, remove the Intermediate, Screenshots and .git folders, and optionnaly the heavier *.pdb files in Plugins\UEPlasticPlugin\Binaries\Win64.
Start by saving your connection credentials with the Unity Version Control GUI
Launch you Unreal project, look at the Source Control menu at the bottom-right
Launch you Unreal project, click on the Source Control icon "Connect to Source"
Then select "Plastic SCM" (or "UnityVersionControl") plugin
Source Control Login window, to create a new workspace/a new repository, click on "Initialize workspace" (example of a cloud repository):
Note that for a @unity organization you also need to select a Unity Project to create the repository:
Or on a server running on premise, using ip:port:
This creates an appropriate ignore.conf file, add all relevant files to source control (.uproject, Config & Content subdirectories) and can also do the initial commit automatically at the end.
Wait for this to succeed before accepting source control settings to not lock the UI & mess with the initialization!
Source control settings can be changed using the Source Control menu,
and are saved locally in Saved\Config\WindowsEditor\SourceControlSettings.ini
.
If you have a project in Unity Version Control but without an ignore.conf file at the root of the workspace,
you can use "Source Control" -> "Change Source Control Settings..." -> "Add a ignore.conf file" button to create a standard one:
Content of the generated ignore.conf, to use as a starting point but to adjust to the specific needs of the project:
Binaries
DerivedDataCache
Intermediate
Saved
Script
enc_temp_folder
.idea
.vscode
.vs
.ignore
*.VC.db
*.opensdf
*.opendb
*.sdf
*.sln
*.suo
*.code-workspace
*.xcodeproj
*.xcworkspace
*.private.*
In order to share this with the team, copy and rename this file into Config\DefaultSourceControlSettings.ini
,
add it to source control and submit it.
The minimal useful setting would be selecting the proper provider, but it can be useful to set a few settings if different than the defaults:
[SourceControl.SourceControlSettings]
Provider=Plastic SCM
[PlasticSourceControl.PlasticSourceControlSettings]
BinaryPath=cm
UpdateStatusAtStartup=False
UpdateStatusOtherBranches=True
EnableVerboseLogs=False
Unreal Engine allows you to configure project-related settings.
The plugin allows you to configure project-related settings.
There are 3 settings available at the moment:
Unreal Engine allows you to configure Editor behaviors. In particular:
Official documentation from Epic Games:
Plastic SCM forums:
(UE5.1) Source Control Menu and status tooltip, extended with commands specific to Unity Version Control:
(UE5.2+) Revision Control Menu and status tooltip, extended with commands specific to Unity Version Control:
Each Asset Editor also provide some revision control operation, typically to Submit Content:
The Blueprint Editor also provide a toolbar drop-down to visual diff against a previous revision:
Using the Content Browser context revision control sub-menu, you can call in specific actions and windows:
Submit Files to Revision Control window, to check-in selected assets directly (see also Changelists below):
Changelists are the new way to group checked-out files by topic in Unreal Engine 5.0, to submit them in coherent batches.
UE5.0 includes Validation checks to ensure there are no missing dependencies outside a changelist, and that all assets are saved on disk before submitting.
File History window, to see the change-log of an asset:
Visual Diffing of different revision of a Blueprint:
Textual Diffing of a Material:
When Source Control is enabled Unreal creates a redirector whenever an asset is renamed or moved, so that other developers relying on its old name / location can still work with other assets referencing it.
This means, you end up with two files that you have to submit, even if by default they don't show up in the Content Browser.
You can show them in the Content Browser using a dedicated filter:
You can also delete them recursively using the context menu "Fix Up Redirectors in Folder":
If you are making use of multiple branches, either for releases and patches, or for tasks or features, you can enable an option to check for changes in all other branches.
Enable "Update Status" to also checks the history to detect changes on other branches:
Tooltip in the Content Browser when an asset is already checked-out and Locked somewhere else:
Tooltip in the Content Browser when an asset has been modified in another branch:
Tooltip in the Content Browser when an asset has a Retained Smart Lock in another branch:
Warning when trying to checkout an asset that has been modified in another branch:
Warning when trying to modify an asset that has been modified in another branch:
The plugin now offers full support for branches, with a new window to list and filter them, and the ability to create, switch to and merge branches from within the Unreal Editor, reloading assets and the current level as appropriate.
To open it, use the "View Branches" menu item in the Revision Control menu, or click on the name of the current branch in the status bar.
View Branches window:
See the workflows sections below for a discussion about task branches.
Creating a new child branch:
Renaming an existing branch:
Merging a branch into the current one:
Deleting the selected branches:
The plugin has a new dedicated window to display the history of Changesets, to search and filter them, diff them and view their changes, or switch to any of them or their underlying branch.
To open it, use the "View Changesets" menu item in the Revision Control menu.
View history of Changesets window, with a context menu to interact with these changesets:
It displays the list of files changed in the selected changeset, with contextual operations:
Meet Smart Locks, a new way to reduce merge conflicts with Unity Version Control
The plugin now offers full support for Smart Locks, with a new window to list and filter them, and the ability to release or remove them selectively.
To open it, use the "View Locks" menu item in the Revision Control menu.
View Locks window:
Smart Locks administrator context menu to configure lock rules or unlock an asset:
In case you ever use branches with binary assets without relying on exclusive checkouts (file locks) (see Workflows below) you will encounter cases of merge conflicts on binary assets. You have to trigger the resolve in the Unity Version Control GUI, but then skip it without saving changes in order to let the Editor present you with a visual diff.
Branch explorer showing the merge pending with an asset in conflict:
Corresponding icon in the Content Browser (only showing after the resolved has been triggered in Unity Version Control):
Right click on the asset in conflict to open the Merge Tool (just a conflict solver with 3-way Visual Diff, no merge):
Visual diff of Blueprint properties in conflict:
Visual diff of a Blueprint Event Graph in conflict:
The most common workflow with Unreal Engine binary assets is the one taught by Perforce: It relies mostly on one main branch (stream) for everyone with exclusive checkouts (locks) for the whole Content/ subdirectory, in order to prevent merge conflicts on a uasset or a umap file.
This typical workflow would work the best with the workspace in partial mode configured using Gluon GUI. The reason is that a partial workspace enables you to checkin assets without the need to update the workspace before.
If you try to use a full workspace (with Unity Version Control GUI instead of Gluon) you will often need to update the workspace before being able to checkin.
Handling of binary assets typically works best when working all together in a single main branch (regardless of the source control used). This is because binary files cannot be merged, and since they increase the cost (time/bandwidth) of switching between branches.
But with Unity Version Control you can use branches that are easy and cheap to create and merge. Using them for code will enable you to leverage the built-in code review on these branches. And in combination with SmartLocks and the full in-Editor Branches support, you can now use them safely for binary assets as well!
Note that some studios have always been using task branches for assets, and included them in their code reviews. Unity Version Control locks extend to all branches, preventing two people from working at the same time on the same assets regardless of the branch they are one. The plugin also offers full branch support and warn users if an asset has been changed in another branch.
To use branches, you would need to also close the Editor before switching from a branch to another, and before merging a branch into another:
The plugin also leverages the visual diff merge conflicts resolution tool from the Editor but this is a pain and isn't working as expected currently (as of 1.5.0 & UE5.0)
The plugin works with the command line interface "cm" that currently requires your credentials to be stored. Use the Desktop Client or Gluon GUI to enter and save your credentials before enabling Unity Version Control in Unreal.
Administrator guide - Chapter 7: Configuring exclusive checkout (Lock)
Binary assets should be locked for exclusive access to avoid merge conflicts.
To lock all assets on the whole Content
directory, you need to put a lock.conf
in your server directory (for instance C:\Program Files\PlasticSCM5\server
) with this content:
rep:<repname> [br:[<destination_branch>]] [excluded_branches:<exclusion_pattern>…]
/Content
For instance a specific ruleset to one repository:
rep:UE5PlasticPluginDev
/Content
or with multiple destination branches for Locks:
rep:UE5PlasticPluginDev br:/main /main/release excluded_branches:/main/experiments
/Content
or using file extensions instead of a path:
rep:UE5PlasticPluginDev
*.uasset
*.umap
The more generic config applying to all respository on the server would be:
rep: *
/Content
But beware, as this default global rule will not be used (merged) with any other rules specific repository, but completely replaced ("overridden") by them.
On Unity Version Control Cloud, you can just set-up lock rules like that:
/Content
In "Preferences -> Diff tools" add a new config for uasset and move it up before the existing $binary
one:
The command line needs the quoted path to the UnrealEditor.exe, the quoted patch to your ".uproject" file, -diff, then the source & destination files variables also quoted
"C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\Win64\UnrealEditor.exe" "C:\wkspaces\ProjectName\ProjectName.uproject" -diff "@sourcefile" "@destinationfile"
eg:
"C:\Program Files\Epic Games\UE_5.2\Engine\Binaries\Win64\UnrealEditor.exe" "C:\UnitySrc\UE5UnityVCSDevEnv\UE5UnityVCSDevEnv.uproject" -diff "@sourcefile" "@destinationfile"
To configure a text diff for any uasset (not only Blueprints) use this command instead
"C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" "C:\wkspaces\ProjectName\ProjectName.uproject" -NoShaderCompile -run="DiffAssets" %1 %2 DiffCmd="C:\Program Files\PlasticSCM5\client\mergetool.exe -s={1} -d={2}"
eg:
DiffCmd="C:\Program Files\Perforce\p4merge.exe {1} {2}"
"C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" "C:\UnitySrc\UE5UnityVCSDevEnv\UE5UnityVCSDevEnv.uproject" -NoShaderCompile -run="DiffAssets" %1 %2 DiffCmd="C:\Program Files\PlasticSCM5\client\mergetool.exe -s={1} -d={2}"
This version here is the development version, so it always contains additional fixes, performance improvements or new features compared to the one integrated in Engine.
Note: Version 1.11.0 2024/06/18 is the last one supporting UE 4.27
Some are reserved for internal use by Epic Games with Perforce only:
You can always ask for support in:
To help diagnose any issue related to the plugin or to the Editor, toggle Verbose logs for LogSourceControl in Source Control settings.
Unreal log files are in <ProjectName>/Save/Logs/ProjectName.log
.
To help diagnose any issue related to the underlying Unity Version Control "cm" Command Line Interface, enable debug logs for the CLI client cm.exe:
Copy the configuration file cm.log.conf in the directory where the cm.exe resides, by default in C:\Program Files\PlasticSCM5\client\
.
cm log files are then stored in <LOCALAPPDATA>\plastic4\logs\cm.log.txt
.
(from enable logging for Plastic SCM)
To report an issue, please create a support ticket as it helps sort the priorities Unity Version Control support.
You can also use the Github issue-tracker.
<ProjectName>/Saved/Logs/ProjectName.log
<LOCALAPPDATA>\plastic4\logs\cm.log.txt
If you want to help, Github Pull Requests are welcome!
See also Unreal Engine C++ Coding Standard
All the relevant C++ source code of the plugin reside in one subdirectory <ProjectName>/Plugins/UEPlasticPlugin/Source/PlasticSourceControl/Private/
class FPlasticSourceControlProvider : public ISourceControlProvider
classes FPlastic<Operation> : public ISourceControlOperation
bool FPlasticCheckOutWorker::Execute(FPlasticSourceControlCommand& InCommand)
using the following two classes:
class IPlasticSourceControlWorker
class FPlasticSourceControlCommand : public IQueuedWork
class FPlasticSourceControlState : public ISourceControlState
class FPlasticSourceControlRevision : public ISourceControlRevision
class FPlasticSourceControlChangelist : public ISourceControlChangelist
class FPlasticSourceControlChangelistState : public ISourceControlChangelistState
class FPlasticSourceControlModule : public IModuleInterface
namespace PlasticSourceControlUtils
with free functionsnamespace PlasticSourceControlShell
with free functions and internal static variablesclass SPlasticSourceControlSettings : public SCompoundWidget
Saved\Config\WindowsEditor\SourceControlSettings.ini
Config\DefaultEditor.ini
)cm location
cm find revision "where item='Content/ThirdPerson/Blueprints/BP_ThirdPersonCharacter.uasset'"
Copyright Unity Technologies Developed by Sébastien Rombauts (sebastien.rombauts@gmail.com)