Unity supports version control integration with Perforce.
To start working with Perforce in Unity, do the following:
At this point you should be able to do most of the important version control operations directly on the assets in the project view, instead of going through the version control client.
You should also be able to see the status that each asset has. An asset can be:
You can overview the files in your changelist from the Version Control Window ( ). It is shown here docked next to Inspector in the editor:
By right clicking assets or changelists in this window you perform operations on them. To move assets between changelists just drag the assets from one changelist to the header of the target changelist.
Things to note:
The following icons are displayed in Unity editor to visualize version control status for files/assets:
File added locally | |
File added to version control by another user | |
File is checked out by you� | |
File is checked out by another user | |
There has been a conflict merging this file. Needs to be resolved | |
File has been deleted by you | |
File has been deleted by another user | |
File is not yet under version control | |
File is locked by you | |
File is locked by another user | |
Another user has checked in a new version of this file. Use "Apply Incoming Changes" to get latest version |
When working with assets, Unity automatically checks out both the asset file as well as the associated .meta file. In most situations however, the .meta file is not modified, which might cause some extra work e.g. when merging branches at a later point. It's possible to configure Perforce to revert unchanged files on submit, which is done in P4V by selecting
, viewing the tab and setting the value of On submit to :Unity supports working in offline mode, e.g. to continue working without a network connection to your version control repository. Please refer to Perforce documentation for further information on working in offline mode for Perforce.
If Unity for some reason cannot commit your changes to Perforce, e.g. if server is down, license issues etc., your changes will be stored in a separate changeset. If the console doesn't list any info about the issue you can use the P4V client for Perforce to submit this changeset to see the exact error message.
For work with the Asset Server (Unity's internal Version Control System) refer to the Asset Server documentation.
In order to work with a version control system unsupported by Unity, select Editor Settings. This allows you to manage the source assets and metadata for those assets with a version control system of your choice. For more on this, see the documentation for External Version Control Systems
as the for Version Control in thePage last updated: 2013-07-04