Please carefully follow the instructions below to do the initial setup of your Unity project with SVN source control. These instructions assume that you are using Unity Pro on PC and TortoiseSVN has been installed, which is the case for the machines in the IMGD lab. They also assume you are familiar with SVN and TortoiseSVN. (If you prefer to use the SVN command line client, see these instructions.)
This setup process is a bit touchy, but once you are set up, updates and commits are very straightforward using TortoiseSVN. Note that you will also conveniently be able to perform SVN operations directly in the MonoDevelop Solution window. (MonoDevelop automatically detects the presence of SVN files).
Once you you done this setup, never move, rename, add or delete Unity files directly in the File Explorer! Doing so can easily break the integrity of your project. All file changes can conveniently be done in the Unity Editor's project window.
- Confirm your group folder name by visiting
sourceforge in your browser and going to the D12 code repository in the IMGD4000-4500 project area. In the following instructions replace our_folder by your group folder name.
- In the Unity Editor, select File > New Project to create a new project with your group folder name (see 1) in some convenient location.
- In the Unity Editor, select Edit > Project Settings > Editor and choose "Meta File" option.
- Add a dummy asset to your new project (you can delete it later), e.g., in the Project window, select
Create > Prefab.
- Quit the Unity Editor to ensure all files get saved and any temporary data goes away.
- Navigate in the File Explorer to the new project folder you just created. Delete the Library subfolder and also the temp subfolder if it is there.
- Right click on the project root folder and select Import from the TortoiseSVN menu. In the URL field type in:
where our_folder is your group folder name, and then click OK to upload your files to the repository.
- Delete the root project folder you just created in your local file system.
- Use the TortoiseSVN Checkout command to check out a fresh copy of your project from the repository (in same location) using the url given in step 6 above.
- The remaining steps are optional but highly recommended. What they do is guarantee that you will not be bothered in SVN about changes in various Library files that are not supposed to be committed to the repository.
- Open the Unity Editor again, Select File > Open Project, navigate to the project folder you just checked out and wait while it rebuilds its Library files. Then quit Unity again.
- In the File Explorer, right click on the root folder of the project and select Commit from the TortoiseSVN menu.
- Under the "Changes made" section that pops up, you'll see many non-versioned files in the Library subfolder. Select all the folders and files that are immediate children of the Library folder. Right click on them and select Add to Ignore List > Ignore by Name.
- Now commit all the files in the project. The only thing that should happen is updating of the ignore properties---no files should actually be uploaded.