Version: 2020.1
Perforce Integration
Plastic SCM plugin for Unity (beta)

Plastic SCM Integration

Use Plastic SCM version control software to enable teams to collaborate on Unity projetcs.

Learn how to set up Plastic SCM. Leanr how to set up version control in Unity.

Checking files out with Plastic SCM

Plastic SCM automatically checks files out if you have modified them. The only files that you must specificly check out to modify are Project SettingsA broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your project behave. More info
See in Glossary
files.

Resolving conflicts and merging with Plastic SCM

When you edit something locally in your project which has also been edited remotely, a conflict occurs. If your project has conflicts, you must:

  • Review the changes
  • Merge the changes

If Unity recognises that you need to perform a merge before you submit changes then it prompts you to complete the merge. This takes you to the Plastic SCM client.

If incoming changes conflict with local changes then a question mark icon appears on the conflicting files in the Incoming changes window. Here is a quick guide to resolving conflicts and merging with Plastic SCM:

  • In the Version ControlA system for managing file changes. You can use Unity in conjunction with most common version control tools, including Perforce, Git, Mercurial and PlasticSCM. More info
    See in Glossary
    window select the Apply all incoming changes button. This automatically takes you to the Plastic SCM GUI client.
  • In the client window, click Explain merge for a more visual understanding of the changes. Select Process all merges and another window displays.
  • This window shows the individual conflicts, and you can choose what changes you want to keep or discard.
  • Once you have resolved the conflicts, select save and exit, and Plastic SCM will complete the merge operation.
  • Push the changes through Unity’s Version Control window.

Locking Files with Plastic SCM

To lock files with Plastic SCM, perform the following actions:

  • Create a lock.conf file and place it in your server directory. You can find your server directory in ../PlasticSCM/server.
  • In the lock.conf file, specify the repository you are working on and the server to complete the lock checks. Here is an example:
rep:default lockserver:localhost:8087
*.unity
*.unity.meta

In this case all .unity and .unity.meta files are going to be locked for checkout on repository ‘default’.

  • Open the Unity Editor and check out a file that you expect to be locked, then go back to the terminal/command line and type: cm listlocks
  • The terminal/command line window displays a list of locked files. You can also test if this has worked by trying to check out the same file using a different user. An error will appear in Unity’s console saying the file is already checked out by another user.

For more information on locking, see Locking: avoiding merges for unmergeable files and Configuring exclusive checkout (Lock).

Differences from Perforce

PlasticSCM does not support remote activity, like PerforceA version control system for file change management. More info
See in Glossary
does. As such, this functionality is unavailable for Plastic SCM in the Editor. Statuses such as: “Checked out Remote” or “Out of Sync” aren’t displayed in the Project windowA window that shows the contents of your Assets folder (Project tab) More info
See in Glossary
.

Distributed and offline work with Plastic SCM

Learn more about distributed version control.

Learn more about distributed and centralized version control.

Perforce Integration
Plastic SCM plugin for Unity (beta)