How To: Manage a Unity3D Project In TFS Source Control

03/03/2014

one comment

I get this question a lot lately, so I decided to write my answer here. Still there is no built in support for Unity3D and Source Control but using TFS 2012, 2013 Local Workspace feature maintain Unit3D project using Source Control is easy.

In source control, create a projects repository folder.

image

In Source Control explorer enter to “Workspaces”.

image

Create new Workspace, I called my “Unity Project”, and mapped it to local folder.

image

 

The important thing here is to make sure you create Local Workspace rather than Server Workspace. (Open the Advanced option)

When you use a local workspace, you get the following advantages:

1. Work offline easily. You can quickly begin editing a file when your network connection is unavailable or unreliable. From Solution Explorer you can add, edit, delete, rename, undo, and compare items in your workspace even when you’re not connected to your Team Foundation Server.

2. Easily restore files that you have deleted locally. To restore locally deleted files, just get your files.

3. Visual Studio automatically detects changes. When you add or delete files outside of Visual Studio, the program automatically detects these changes.

image

In Unity Create new project and mapped that project to the folder we just created for TFS.

image

Here are some files that was created in Unit3D

image

Now lets switch back to Visual Studio and open “Pending Changes” window, make sure you’re standing on “Unity Projects” workspace and click on “Detected: ** add(s)” link

Local Workspace has detected 87 new files

image

Just click promote to bring those files to included items in Pending Changes window.

SNAGHTML488e9c9

And that’s it, you have the Unity3D project structure in TFS, next time you change files you will notice those changes in Pending Changes window, new files you appear again in “Detected: ** add(s)” link so make sure to promote them.

image

Enjoy.

Add comment
facebook linkedin twitter email