Using External Version Control Systems with Unity
Plastic SCM Integration
For more information on Plastic SCM you can visit their website.
Setting up Plastic SCM
Refer to the Plastic SCM documentation if you encounter any problems with the set up process on the version control page.
Checking Files Out with Plastic SCM
Plastic SCM automatically checks files out if they have been modified, this makes it more convenient for you. The only files that require specific checking out instructions are Project Settings files otherwise you can’t change them.
Resolving Conflicts and Merging with Plastic SCM
A merge is likely to happen when you have edited something in your project locally which has also been edited remotely (a conflict). This means you will need to review the changes before the merge can be performed. If Unity recognises that a merge must be completed before changes can be submitted then you will be prompted by Unity to complete the merge, this will take you to the Plastic SCM client.
If incoming changes conflict with local changes then a question mark icon will appear on conflicting files in the incoming changes window. Here is a quick guide to resolving conflicts and merging with Plastic SCM:
- In the Version Control window click on the’Apply all incoming changes’ button, this will automatically take you to the Plastic SCM GUI client.
- Within the client window you will be able to click ‘Explain merge’ for a more visual understanding of the changes. Now click ‘Process all merges’ and another window will display.
- Here you will be shown the individual conflicts and given the option to choose what changes you want to keep or discard.
- Once you have solved the conflicts click on save and exit, this will have completed the merge operation.
- You now have to push the changes like normal through Unity’s version control window.
Locking Files with Plastic SCM
In order to lock files using Plastic SCM there are a few steps to follow:
The first thing you must do is create a lock.conf file and make sure it is placed within your server directory. You can find your server directory from “../PlasticSCM/server”.
In your lock.conf file you must specify the repository you are working on and the server that will 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’.
- You may want to restart your server at this point, you can do this by opening a terminal/command line window and locating the server directory. Once in the directory you can restart the server by typing:
./plasticsd restart
- Now go back to Unity and check out a file that you expect to be locked, then go back to the terminal/command line and type:
cm listlocks
If the steps have been followed correctly the terminal/command line window should now display 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 you can visit the Plastic SCM lock file documentation.
Distributed and offline work with Plastic SCM
To find more about working in distributed mode (DVCS) and offline with Plastic SCM check the Distributed Version Control Guide.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Is something described here not working as you expect it to? It might be a Known Issue. Please check with the Issue Tracker at issuetracker.unity3d.com.
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thanks for helping to make the Unity documentation better!
Using External Version Control Systems with Unity