TExcelTAD
Home › Assets, Tools & Shipping › Perforce & Unity Version Control

Perforce & Unity Version Control

Git is the default for code everywhere, but many game studios version their whole game (code, art, audio, levels: often terabytes) in a centralized system built for big binary files and locking. The two you'll meet most are Perforce P4 (long known as Helix Core, renamed P4 in 2025; the command-line client has always been p4) and Unity Version Control (formerly Plastic SCM). This lesson gives you enough to work in a studio that uses them, and to decide whether your own team needs one.

Centralized vs distributed

Git (+ LFS) Perforce P4 Unity Version Control
Model distributed: every clone has the history centralized: the server has the history, you sync files both: centralized for artists (Gluon), distributed branches for programmers
Big binaries via LFS native native
Locking LFS locks, per path native exclusive checkout (+l file type) native lock rules on the server
Partial checkout sparse checkout, LFS includes native: map only the folders you need into a workspace native in Gluon
Typical users indies, web/mobile, code-heavy teams AAA and many Unreal studios Unity teams, especially mixed art/code
Cost free tooling; hosts charge for LFS storage free tier for small teams, paid beyond included in some Unity plans, usage-based beyond

Check the vendors' current plans and seat limits; they change.

Perforce in one session

Perforce's vocabulary: the server stores files in a depot; your workspace (also called a client) maps depot paths to a local folder; you sync to get files, open files for edit (they are read-only until then), group them into a changelist, and submit it atomically. Projects usually use streams (//Game/main, //Game/release-1.0), Perforce's structured branches.

bash
p4 set P4PORT=ssl:perforce.example.com:1666     # server (once per machine)
p4 set P4USER=ada
p4 login
p4 set P4CLIENT=ada-desktop-game                 # workspace, created with `p4 client`

p4 sync                                          # get the latest revision of everything mapped
p4 edit Content/Maps/Arena.umap                  # open for edit (takes the lock if the type is +l)
p4 add Content/Characters/Hero/T_Hero_ORM.uasset # new file
p4 opened                                        # what you have open
p4 submit -d "Arena: move spawn points away from the lava"
p4 revert Content/Maps/Arena.umap                # or discard changes and release the file

Binary assets are made exclusive with a typemap, which sets the file type for path patterns. binary+l means "binary, exclusive open": only one person can have it open for edit at a time. A typical Unreal typemap section (edited with p4 typemap) looks like this:

text
TypeMap:
        binary+l //....uasset
        binary+l //....umap
        binary+l //....psd
        binary+l //....blend
        text //....ini
        text //....cpp
        text //....h

//... means "any depot path", so //....uasset is "any file ending in .uasset". Ignored files are listed in a .p4ignore file (enabled with p4 set P4IGNORE=.p4ignore), the counterpart of .gitignore.

Unreal's own tooling assumes Perforce in many places: the editor's source control integration, UnrealGameSync (UGS) for syncing precompiled editor binaries to artists, and Horde for builds.

Unity Version Control in a paragraph

Unity Version Control (UVCS) is built into the Unity Hub and editor (Window → Unity Version Control, and a Desktop client). Programmers work with branches and merges much like Git (changesets, branch explorer, strong merge tools); artists use Gluon, a simpler file-based mode where you pick files, check them out (taking a lock where the server's lock rules require one), and check them in. It is a reasonable choice for Unity teams that want locking and big-file handling without running their own server; read Unity's current pricing for storage and seats.

A runnable model: exclusive open and "out of date"

Two rules make centralized version control work for binaries: exclusive open and you can only submit on top of the latest revision. Here's both, as the server enforces them:

python · try it yourself
class Depot:
    def __init__(self):
        self.head = {"Arena.umap": 7, "Player.cpp": 3}  # path -> latest revision
        self.exclusive = {".umap", ".uasset"}            # +l file types
        self.opened = {}                                 # path -> set of users
        self.have = {}                                   # (user, path) -> synced revision

    def sync(self, user):
        for path, rev in self.head.items():
            self.have[(user, path)] = rev
        return f"{user}: synced"

    def edit(self, user, path):
        others = self.opened.get(path, set()) - {user}
        if any(path.endswith(ext) for ext in self.exclusive) and others:
            return f"{user}: can't edit exclusive file {path}, already opened by {', '.join(sorted(others))}"
        self.opened.setdefault(path, set()).add(user)
        return f"{user}: {path}#{self.have[(user, path)]} opened for edit"

    def submit(self, user, path):
        if self.have[(user, path)] != self.head[path]:
            return f"{user}: submit failed, {path} out of date (have #{self.have[(user, path)]}, head #{self.head[path]}); sync and resolve"
        self.head[path] += 1
        self.have[(user, path)] = self.head[path]
        self.opened[path].discard(user)
        return f"{user}: submitted {path}#{self.head[path]}"

d = Depot()
for line in [d.sync("ada"), d.sync("grace"),
             d.edit("ada", "Arena.umap"), d.edit("grace", "Arena.umap"),
             d.edit("ada", "Player.cpp"), d.edit("grace", "Player.cpp"),
             d.submit("ada", "Player.cpp"), d.submit("grace", "Player.cpp"),
             d.submit("ada", "Arena.umap"), d.edit("grace", "Arena.umap")]:
    print(line)
ada: synced
grace: synced
ada: Arena.umap#7 opened for edit
grace: can't edit exclusive file Arena.umap, already opened by ada
ada: Player.cpp#3 opened for edit
grace: Player.cpp#3 opened for edit
ada: submitted Player.cpp#4
grace: submit failed, Player.cpp out of date (have #3, head #4); sync and resolve
ada: submitted Arena.umap#8
grace: Arena.umap#7 opened for edit

Code files can be opened by several people at once; the second submitter must sync and resolve (merge), as with Git. The .umap can't be opened twice at all, which is exactly the protection binary files need.

Choosing for your team

  • Solo or small team, mostly code, assets under a few GB: Git + LFS on a normal host. Simple, free tooling, works with every CI.
  • Unreal team with artists, or assets in the tens of GB and up: Perforce is the path of least resistance; most Unreal tooling and documentation assume it.
  • Unity team that wants locking and a GUI for artists without hosting a server: Unity Version Control.
  • Whatever you choose: set up ignore rules and binary/lock rules on day one, and practise restoring an old build before you need to.

Test yourself

What does the Perforce file type binary+l mean?

  1. Binary, compressed
  2. Binary, exclusive open: only one user can have it open for edit
  3. Binary, stored in LFS
  4. Binary, large file

In Perforce, what must you do before editing a file in your workspace?

  1. Nothing
  2. Open it for edit with p4 edit, since synced files are read-only
  3. Create a branch
  4. Run p4 submit

What is Gluon in Unity Version Control?

  1. A merge tool for C#
  2. A simplified, file-based workflow for artists with checkout and locks
  3. A build server
  4. A texture compressor