# Integration of Unity Version Control with the SCM features of Microsoft Visual Studio

> Use version control with source control management in your IDE.

## Intro

[`plastic-scm`](https://marketplace.visualstudio.com/items?itemName=plastic-scm.plastic-scm)
is a Visual Studio Code extension that integrates [Unity Version Control System (UVCS)](https://unity.com/solutions/version-control).
With this plugin, you can use UVCS as your SCM tool.

This plugin contains a subset of UVCS commands and features. Please stay tuned for upgrades.

## Requirements

* Visual Studio Code v1.64
* Unity Version Control (UVCS)

## Features

* Lists your pending changes
* Allows you to checkin all your pending changes at once
* Allow to see inline file changes as well as full-file changes compared to the latest changeset
* Group changes to assets from Unreal Engine 5 One File Per Actor (OFPA) in the "Dirty Unreal Levels" resource group, coalesced under the name(s) of the corresponding map(s)

## Install

1. Install *Visual Studio Code* (1.64 or higher)
2. Launch *Code*
3. Open the command palette : `Ctrl` `⇧` `P` (Windows, Linux), `⌘` `⇧` `P` (macOS)
4. Select `Install Extensions`
5. Choose the extension `Plastic SCM`
6. Reload *Visual Studio Code*

## Configure

| Name                                                  | Type      | Description                                                                                                        |
| ----------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------ |
| `plastic-scm.autorefresh`                             | `boolean` | Whether the extension should automatically look for changes in the workspace                                       |
| `plastic-scm.enabled`                                 | `boolean` | Whether the extension is enabled                                                                                   |
| `plastic-scm.cmConfiguration.cmPath`                  | `string`  | Location of the `cm` CLI executable                                                                                |
| `plastic-scm.cmConfiguration.millisToStop`            | `number`  | Grace time to wait before requesting a shell to closeshell to start                                                |
| `plastic-scm.cmConfiguration.millisToWaitUntilUp`     | `number`  | Time to wait for the shell to start                                                                                |
| `plastic-scm.decorations.enabled`                     | `boolean` | Whether or not file decorations are enabled                                                                        |
| `plastic-scm.consolidateUnrealOneFilePerActorChanges` | `boolean` | Whether all changes under Unreal Engine 5 One File Per Actor (OFPA) should be groupped under "Dirty Unreal Levels" |

## Commands

### Checkin

You can type in the input field in the SCM view and hit `Ctrl+Enter` to checkin
**all your pending changes**. We don't support selecting what items you want to
check in at the moment.

You can also invoke the Checkin command using the Command Palette. You'll be
prompted to enter a commit message in that case.

### File Changes

When editing a tracked text file, you'll see VS Code show inline gutter color indicators to show lines added, changed, or removed, similar to using Git or other source control extensions. You can also open the Source Control panel to and click on any modified text file to open a full-file diff from the latest changeset.

## Issues

Have a look at the [list of issues on Github](https://github.com/PlasticSCM/vscode-plasticscm/issues).
