What is Unity Version Control?
This guide covers how to set up Version Control in Unity with any of the following Editor versions:
- 2019.4.29f1 or later
- 2020.3.15f1 or later
- 2021.1.15f1 or later
- 2021.2.0b6 or later
- Any version beyond 2022.1.0a4
1. Connect Version Control to Unity
To begin, connect your Unity ID to Unity Version Control and then either select or create a new organization.
- First, open Unity Version Control in Unity by clicking the Unity Version Control icon in the toolbar on the top right. A window will prompt you to complete your setup.
- Click log in or sign up, and Unity Version Control will connect automatically to your Unity ID.
- Next, if your Unity ID isn’t already associated with an organization, you will be prompted to create one. If you already belong to an organization, you will be able to select one to join from a dropdown menu.
2. Create a workspace optimized for your workflow
- Next, return to the Unity Version Control window and click Create workspace.
- Unity Version Control will suggest names for both your repository (shared files and history) and workspace (your local copy). If you wish to use an existing Unity Version Control repository, click the three dots (:) next to the repo name and select a repository from the list.
- Next, select the type of workspace you prefer. Unity Version Control is a version control system optimized for game development and 3D projects. As such, it supports separate workflows within the same repo. We designed the Plastic workspace (distributed) for programmers and the Gluon workspace (centralized) for artists.
3. Add asset files associated with your project
- Next, Unity Version Control will display the project files from the asset folder in the Pending changes tab. You can choose specific files to include or add all to the repository by selecting the files and clicking Checkin changes.
- Version Control will automatically perform a check in for appropriate folders and files – such as package files and project settings – when it’s set up from the Unity Editor. You can view these in the Changesets tab.
- Once your initial asset check in is complete, you’re set up with Version Control for Unity and ready to create.
4. File types set to ignore by default
Additionally, there is a list that’s saved in the ignore.conf file at the root of the project that describes which files should be ignored by default. You can edit this to either add or exclude files from the ignore list.
5. How to invite team members to Unity Version Control
- To invite team members to your project, click on the Options menu (gear icon) in the Version Control tab in Unity, then select Invite Members to Workspace.
- You will be brought to the Unity Version Control cloud dashboard. Here, you can add new users, resend invitations, or set permissions.
Note: You may be prompted to log in with your Unity ID if you are not signed into the Unity Version Control cloud dashboard.
6. The basics of checking in changes and file history
The Pending changes tab is where you will check in the changes you’ve saved to the project to send to your repository.
The Changesets tab shows you the project history of changes made to the repository and who made each change. Clicking on each listed changeset allows you to see which files were impacted by that changeset.
You can also view the history of each file by right-clicking and selecting View file history, which shows you a list of changes made to the file. You can right-click on an earlier version and select Revert file to this revision.
Whether you are using Unreal Engine, an unsupported Unity version, or another engine, you can still use Unity Version Control’s full functionality by downloading the full client.
1. Download and select workflow
- First, start by downloading Unity Version Control from the Plastic SCM website and following the instructions from the installation wizard.
- Once complete, you will be prompted to launch the type of workflow you prefer. In order to minimize conflicts between artists and programmers as they collaborate, Version Control provides separate GUIs to facilitate two different workflows within the same repo.
- We designed the Plastic option for programmers and the Gluon interface for artists.
- This choice is not permanent. You can switch between the Gluon and Plastic interfaces using the top-right menu in the client.
2. Log in and set up Unity Version Control
- Next, you will be asked to sign in or sign up for an account. Even if you will not be using Unity as the game engine for your project, we recommend using a Unity ID.
3. Select or create an organization
- You will be taken to the Plastic home screen, as shown above. If you have no organizations associated with the account, you will be asked to create one. Otherwise, you can select an existing organization that you want to work with.
- If there are existing repositories, a list will be shown on the left. By clicking one, you can browse repository content before grabbing a working copy of it.
4. Select or create a repository and workspace
- Click (+) to create a new repository, or select one of the repositories and hit the blue download button to create a workspace and sync it with the repository.
- For the on-disk path, make sure to select the directory that currently contains the files for your project.
5. Add packages and project settings files
- The Unity Version Control client will now open your project.
- If you are directed to an existing project in the previous step, you will need to navigate to the Pending changes tab (if using the developer interface, as shown above), select all packages and Project Settings files and folders, then click Checkin to commit them.
6. Add asset files and get ready to start
- Next, select the asset folders and files you need to add to the repository to begin working, and click Checkin again.
- If these are set to private, you can navigate back to Workspace Explorer (called Explore workspace in Gluon), find the files, right-click on them, and select Add to source control, then complete the checkin in the Pending changes tab.
- You are now set up with Unity Version Control and ready to create.
7. File types set to ignore by default
Additionally, there is a list that’s saved in the ‘ignore.conf’ file at the root of the project that describes which files are ignored by default. You can edit this to either add or exclude files on the ignore list.
8. Pushing changes using a separate client
When using the standalone Unity Version Control client outside of the engine, you’ll need to Checkin changes you saved to the project using the client in a separate window.
The Pending changes tab (or Checkin changes in Gluon) is where you will check in changes you’ve made to the project to send to your repository.
9. View file history and reverting files in client
The Changesets tab shows you the project history of changes made to the repository and who made each change. Double-clicking on the changeset listed allows you to see which files were impacted by that changeset.
You can also view the history of each file by right-clicking and selecting View file history, which shows you a list of the changes made to the file. You can also right-click on an earlier version and select Revert to this revision.
10. Connecting Unity Version Control to Unreal Engine
If you’re using Unity Version Control with Unreal Engine, you can use source control inside the editor without maintaining separate windows for most tasks. You can find more information on the Unreal Engine plug-in at the link below.
More helpful resources
Explore best practices to optimize your workflows.