Unity Version Control Extension for Visual Studio

Warning: Unity DevOps is discontinuing support of the Visual Studio extension on the January 9th, 2025. UVCS versions and patches after January 9th don't include support for this plugin. For more information, submit a ticket or send an email to devops-vcs-support@unity3d.com.

Note: If you still use the deprecated Visual Studio Source Control Package, you can refer to the deprecated MS Visual Studio integration documentation.

The Unity Version Control (UVCS) extension works to enhance Visual Studio and allow you to connect and work with your cloud.unity.com repositories. The extension uses your CLI credentials to add UVCS features and built-in controls to effectively manage your version control workflow:

  • Open your solution and code directly in your UVCS workspace.
  • Create and switch branches, and shelve or check in your changes.
  • View the status of your files, and view any modified files.
  • Track file history and diffs, and annotate your files.

For information on version control concepts in UVCS, refer to the Concepts documentation.

Prerequisites

  • Visual Studio 2022 (versions 17.0 or higher).
  • Unity DevOps Version Control desktop application. For information on how to install the desktop application, refer to Download the desktop client.
  • A UVCS workspace and solution.

Install the UVCS Extension

You can install the UVCS Visual Studio extension from your Visual Studio application:

  1. Select Extensions > Manage Extensions.
  2. Search for Unity Version Control Extension for Visual Studio.
  3. Select Install.

For the extension to install, you need to close any open Visual Studio windows you have open, and select Modify in the resulting pop up window.

You can also view the Unity Version Control Extension for Visual Studio in the Visual Studio Marketplace.

Select UVCS as your Source Control

You need to configure Visual Studio to use Unity Version Control as the source control plug-in:

  1. In your Visual Studio application, select Tools > Options.
  2. From the options, select Source Control > Plug-in Selection.
  3. From the dropdown, select Unity Version Control System and select OK.

Open a solution

For the UVCS extension to work, you need to open a solution from an existing UVCS workspace. You can create a workspace in the UVCS Unity Cloud Dashboard.

Version Control options

To open the UVCS extension specific option menu, you can right-click on a file and select Unity Version Control.

OperationDescription
Add to source controlManually add a private file to your source control.
CheckoutCheck out a file to indicate that you want to modify it. If you have pre-configured lock rules, these apply to files you check out.
Check inCheck in any modified files to your source control.
Undo changesRevert a change to a file.
HistoryView a file’s previous changesets and modifications.
AnnotateView the author of any changes made to a file and when the changes were made.
Diff with previousView the diff of the current file with the previous version.
DiffView a full diff of the current file.

UVCS Changes panel

The UVCS Changes window displays new and changed files in your local version of the project. Use this tab to check in your files to the UVCS workspace, exclude files from version control, and compare changed files with the previously checked-in version.

To view more information about the repository, you can hover over a file in the pending changes list. To view more information about the specific changeset and location, you can hover over the branch icon.

Check-in

To include file modifications in your workspace and allow your collaborators to access them, you need to check them in.

When you check in your files, the UVCS Changes window refreshes and no longer lists the files you have checked in. The files that you check in compile into a changeset, which you can view in the UVCS Workspaces window.

To check in files:

  1. Select the files you want to check in.
  2. In the text field, enter a comment to explain your changes.
  3. Select the Check-in button.

Shelve

If you don’t want to add your changes to your workspace, but you do want to keep them, you can shelve the changes and return to them later:

  1. Select the files you want to shelve.
  2. In the text field, enter a comment to explain your changes.
  3. Select the Shelve button.
  4. Select whether you want to remove the changes from the pending changes list after you shelve them.

To view your shelved changes, select Shelves at the bottom of the window. This tab shows any shelves that you own. If you right-click a shelved change, you have the following options:

  • Preview: to preview the shelved changes
  • Apply: to restore the shelved changes to your current workspace.
  • Delete: to remove the changes entirely.

Note: If you apply shelved changes, you still need to check the changes in.

Undo

If you’ve made changes in your project that you don’t want to keep, you can revert back to the latest checked-in version.

To revert changes to a file:

  1. Select any files you want to remove.
  2. Select the Undo button and confirm Yes.

This removes the selected changes from both the pending changes list and your project.

UVCS Workspaces panel

The UVCS Workspaces window lists the changesets in your workspace. This window shows the following information about each changeset:

  • The changeset ID
  • The date the changeset was made.
  • The owner of the changeset.
  • Any comments on the changeset.
  • The branch the changeset is on.

To view changesets from a specific branch, you can select a branch from the sidebar.

Options

To view the options, right-click on the changeset:

OptionDescription
View detailsOpen a details panel below the changeset list.
Switch workspace to this changesetRevert your local workspace to the state it was in at a previous changeset.
Create branch from this changesetCreate a new branch in the state of the changeset.