Unity Version Control Help Needed.

Hi all,

I been recently trying to setup some kind of version control for my team, so they can work from one Unity project. The main reason for the implementation is that the coders and artists are having issues combining there work and cannot spend time copy and paste changes into one project.

As a newbie to this of course I started to Google various systems, these have included Perforce,Git and SVN. So far I have failed to find one solid and newbie friendly guide for any of these, problem is even worse when trying to combine with Unity3d.

I was told that Git is most popular and easiest solution for a small team of people, but I do not wish to store my files on 3rd party cloud based servers. Therefore I have bought a Synology DS214+ NAS box located within the office - currently it does support a Git Server but no instructions. The plan is to keep repos/projects on this NAS and at the same time to act as a version control server.

So my ideal setup:

Windows + Mac Machine → Unity3d → Open Project From Synology Box → Make changes → Commit to Synology Box. (Ability to view files some sort of GUI).

Can anyone help by firstly from experience explaining what may be the best solution for 2014 - lot of outdated stuff on the net, is Git the best way to go or should look into other solutions also.

Second if anyone has any guides for any of the version controls it would be most helpful.

Actually right now any advice would help as kind of stuck.

Thank you for support.

If you want the direct integration into Unity - the integration you get via the Team License - then you will have to use either Perforce or SVN. Git is awesome but a) not great for binary assets - the problem is reduced if you switch your project to use Text serialization, but it’s still less than ideal for textures and models - and b) has no direct Unity integration support.

Of the two I’d probably go with Perforce as it’s the one I’ve used with Unity more.

Edit: Also Perforce has integration support for Photoshop and 3DSMax/Maya which may be helpful for your artists

2 Likes

I use Git with GitLab as the central server, but there should be an easy way to install a Git server module for a Synology. I know some of those boxes have easy package repos to install software from.

A handy guide to terms and functionality: git - the simple guide - no deep shit!

Once you understand enough, I can recommend SourceTree or a similar graphical client. The artists will have less trouble with those :slight_smile:

2 Likes

@superpig : I agree that Git isn’t ā€œgreatā€ for binary assets, but I’m interested to know how SVN is any better?

@MrEsquire : I can’t say whether it’s ā€œthe bestā€ or not, but I’ve been using Git for both hobby work and as a team at the office for a couple of years now with Unity and it’s great. Other stuff might be as good / better, but I’ve no complaints. Before that we used the Asset Server included in the Team License at work, and I’m pretty sure that the general preference was that Git is better. (The Team License is still super handy for multi-platform projects, though.)

Subversion used to be considered better at binary file handling, but I’ve seen reports of it failing on very large files too. Saying it’s better for binary isn’t directly tied to how it handles them, I think. It might be more that you can check out sub-trees of a repo, and that it’s all centralised. With Git you replicate the entire repo everywhere, but nothing stops you from using a separate Git repo for source art and another for game-optimised art. Models may be a different pain in the anatomy.

I have used the Asset Server for nearly a year, and it had me running screaming (literally, ask my mom) back to Git+GitLab.

Non-DVCS systems like SVN and Perforce don’t store the entire change history of your binary files on every developer’s machine. They also support locking the file to avoid merge conflicts.

2 Likes

Right, makes sense. It’s easily conceivable that on a large game you’d have terabytes of change history, and storing that on every machine isn’t viable.

Also, I guess that for one-project businesses there’s quite a lot of risk inherent in the concept of all of the people having access to all of the project’s data all of the time…

You can prune old Git repos if they grow unwieldy. This might be the better option if you’re replacing a lot of art, and the oldest versions aren’t worth keeping. But the best option is probably to use Git for code and Subversion for assets.

So I decided give Perforce a test run - I used some instructions to install Perforce ARM server on the Synology box and seemed to work, then downloaded the Client from official Perforce to do a test run, no Unity3d involved yet.
I just realized that even when something is uploaded I cannot see the files through the default Synology disk manager. I assume it saving everything in hidden file system. This may cause some issues in the future…

Thing Synology comes with a GIT server but not sure if it behave in the same way.

I decided to test GIT now, so Synology came with the Git server module.
Then there was no further options, I then installed SourceTree and learn t a small tutorial on how to use it.

Now the next thing → instead of using Source Tree locally, need to make a master project copy on the Server box and link the Source Tree program of each user to the NAS box. Sadly there no direct plugins for Unity3d to GIT server?

Ah this causing me so much confusion, why is version control so hard!

Yeah, you’ll want to get everything working just using vanilla Perforce before you bring Unity into the mix.

Pretty much all VCS do not store their data in a ā€˜plain’ setup - it’s not generally possible to just copy files to/from the repo because there’s stuff like differential compression and workflow enforcement going on. In the server config you’ll want to look for the ā€˜P4ROOT’ environment variable, IIRC - that will tell you whereabouts on the server it’s actually storing all your repository data.

I use SVN. The Dreamhost servers take care of the heavy lifting, so for me, it was a few clicks of a mouse on their panel, and then downloading TortoiseSVN. In Unity, it’s one click of a mouse to enable external version control, and then… walla! Done.

Of course, I also make backups on my HD, and on a USB stick, and on a 3rd computer … so uh… you can never be too safe.

Gigi

Progress :slight_smile:

Ah, so close, yet so far! No documentation on the Synology module?

That’s not how DVCS works. You don’t DO anything special to SourceTree, and you don’t link it to the server!

Step 1 is making a repository and adding the files to it.
Step 2 is creating a master repo on the server.
Step 3 is adding this master as a remote.
Step 4 is pushing your local repo to the remote.
Step 5 is everybody else cloning the master’s repo.

Each clone, and your original, now references the master repo, ensuring a push puts changes to the server. You still need to find some docs on managing the server though!

It’s not that hard. It’s just that you’re trying to use a NAS box which may not have the simplest solution installed :wink:

1 Like

Thanks for the information and support guys.

We have managed to install GIT on the Synology NAS box and got it all working correctly.

We also took advice and using Source Tree for our Unity projects.

Feel we reaching a new level of professionalism.
I’m not even sure many people have done this approach before but excellent learning experience - wished we documented the process and issues for others out there as this is a much cheaper and nicer solution then running a big server or power hungry pc 247. One other thing its so easy to use for both Mac and Windows, we have mixture of machines due to the need to build on mobiles.

I do understand now that GIT is the way to go :slight_smile: Sorry perforce was way to confusing for small team and some of the asset store stuff just crazy expensive.

Thank you again.

Perforce is awesome. And it’s free up to 20 users as far as I know.

Correct, but its so hard find any decent guides on the net dude. It all ends up with a bunch of confusion as usually if you work in big industry all this already setup for you, we just small studio trying to get it done some way or another.
Perforce I understand needs to install ARM binaries for NAS boxes, whereas Synology offered GIT module as part of there package and even then they provided no documentation on it.

Yeah, getting up and running with Perforce is a pain, and to really administer it well you almost always need formal training.

The massive advantage is the Unity integration, but maybe something along those lines can be sorted out for Git…