Tanshaydar's Place
Currently nothing
Filed under: Paralycid, Programming

Finally Gave Up On ‘Asset Server’ and Now It’s Git Time

asset-server1
A long time ago, I posted how I wanted to be able to use versioning in development of Paralycid. I was using Unity 4.x at that time, and to be honest, even though Asset Server was not being updated for a very long time, I liked it.

“Why not Git?” no one asked. Well, I believed that Asset Server was the best way for versioning if you are using Unity3D for your project. I turned a blind eye to its fundamental issues like the need of restarting Unity every time (and I did not complain at all because 32 bit editor was reaching limit of 2.5 GB resulting crash each time).


I am not a full time game developer. I work as a software engineer in a software company. That’s my full time job.
When I get home, I want to work on what I like to do. So we have a rather slow pace of development with Paralycid. Asset Server was a very convincing way of keeping ourselves motivated, seeing that each commit added something to the game, but when my credit card’s lifespan finished and Amazon decided to not wait for my renewal and suspend my account on EC2, I thought “Should I better get a VPS?”. But what would I do? Would I get to install Asset Server on that again?

Fast forward to April this year. I’m working as main programming on a game project (one of the freelance jobs I got and still going by the time I’m writing this) and I wasn’t using any versioning at all. The reason is that, I needed to deliver builds and project file on a regular basis. Therefore, I did have a versioning based on milestones. Also, since I was the only programmer, I didn’t need to setup collaboration either. Until the second programmer came in. Now, I needed to have collaboration as well as versioning control.

I asked him if he had Unity Pro license. If he had, I would open a new project in Asset Server and he would be able to checkout. Unfortunately (maybe fortunately?) he didn’t have pro license, and I searched for any way for collaboration. Initially I had thought of using Git, but any git service out there had a size limit (usually 1 GB) and this project folder was already at 2.4 GB. I knew that most of these files were local files which would be re-generated anyway, but Unity had a big flaw until the end of 4.x series, where the scene objects’ reference scripts information would be held under Library folder.
In short, if you don’t put Library folder inside versioning, all your scene objects would be stripped of their scripts. Welcome to nightmare if you had a finalized scene with thousands of objects, nearly half of them having scripts attached to them. Referenced script behavior is missing! Yeah, I’m missing my mind too. (Although, they have many solutions to this problem, but this is not the only problem).

Then…
Then I heard that Unity 5 removed all Library folder dependency for the project structure. It would only and only keep the local data (search for unity cache server for more information). So, I decided to give it a try! At that time I didn’t have a VPS or sort, so I went ahead and used my good ol’ reliable Bitbucket. I set my Unity editor settings for git (Force Text Mode etc.) and checked SourceTree. Everything seemed fine.

I did my first commit, following with a push to remote, and went ahead to Bitbucket site to see the size. Mind that project folder on my hard drive was more than 2GB, but it was only 40 MB on Bitbucket!
What?
Fuck you, Asset Server, with what I was dealing with?

Then came the collaboration part. Unity3D updated this behavior in v5, but some plugins STILL relied on Library folder. Most notable example is DOTween.
Guess what? It was caused by global gitignore file which ignored .dll files from being versioned.
It was not Unity’s or plugins’s fault, it was Visual Studio’s fault, creating gitignore file by itself and adding lines so that .dll files are ignored by Git.
Microsoft is at it again -_-
I removed that line from my global gitignore file and saw that a Unity project is completely good to go with Git versioning. But I still had Asset Server for Paralycid.

When Gokhan in my team was trying to commit some new cool things he did, he encountered a problem. Unity3D would not recognize NavMesh.asset file and neither it would update data from server nor let him push new commits.

Asset Server Error

Asset Server Error – I deleted some text info from picture, I hope you understand.

This and other couple of issues (being unresponsive, requiring to restart Unity3D while it is a 64bit editor now, etc…) finally made me to give up on Asset Server.
I checked some solutions for my VPS, and decided to install GitLab.
Did some configuration, ssh keys etc. and voilà!
I pushed my first commit in less than an hour, which would take around 40 hours in Unity Asset Server.

I’m not quite sure if this is Unity’s fault for not updating their Asset Server tool (it’s 2.0.1 for years, unlike Cache Server) or I am a disabled person for not being able to use it.
But GitLab with its web interface and overall Git itself is now working flawlessly for both versioning, collaboration, and backups.

I’m at peace right now. Branching, merging, reversing… Everything is aweseome.
Only thing left is to finish the damn game 🙂

Verba Volant, Scripta Manent

This site uses Akismet to reduce spam. Learn how your comment data is processed.