Share/Save/Bookmark Subscribe

Wednesday, September 26, 2012

Using Git for Unity 3D projects

I was recently asked by a collaborator why we'd switched to using Git for our Unity projects, and I thought the bullet points I passed to him might serve useful to someone else considering the switch, so here we go:

We previously used Asset Server (via VPN) but switched to Git due to a number of advantages, including:
  • Easy remote access from anywhere, highly performant on most networks. Important for our highly distributed team, and frequent access requests from non-team individuals.
  • Supports branching, allowing us to safely work on multiple features without breaking our main build. This has become particularly important to us since we'll need to be able to support a main release with hotfixes while safely working on future version features.
  •  Excellent support for tagging and selective reverts. Has already saved us a number of times :)
  • Supports offline work beautifully, it's still possible to commit when the network goes down, move onto other tasks, and handle merges later.
  • History is available offline as well.
  • Diff based versioning, as opposed to Asset Server's timestamp based versioning.
  • Better merge and conflict handling.
  • No need for additional per seat client licensing.
  • 3rd party cloud hosted packages available (GitHub in our case) to take management off our hands.
It's by no means perfect of course, and does take some adjustments to workflow, for example:
  • Know what belongs in Git and what doesn't. Basically everything in /Assets and /ProjectSettings, nothing from /Library or other temp locations, and nothing that is frequently autogenerated like Mono projects. 
  • .meta files must always be committed with their assets, some simple rules:
  • Always open the project in Unity before a commit, to allow it to update metas.
  • If you add an asset or folder, it's up to you to commit the meta
  • Move/delete objects in Unity, not the filesystem, so it updates metas accordingly (git detects these actions correctly, moves actually show up as moves in history)
  • If you delete an asset or folder, it's up to you to commit the meta deletion
  • Always delete folders that no longer contain assets and commit the meta deletion
  • Notify the team before you push (we use our Skype group status for this) to avoid pushblocking someone that's doing a large push with something small and trivial.
  • Ideally when starting on what could be a large/time consuming feature, create a local branch so if you need to switch back to master to fix something small you can.
  • Regardless of workflow, there are some difficulties/disadvantages that need to be taken into account when considering the switch:
    • Since each user clones the entire repository, much more disk space is required.
    • It's essential for all users to understand the commit/pull/resolve conflicts/push process, or they can potentially cause serious damage.
    • Not built into Unity, so one more tool to learn.
    • Since game project assets are so large, occasional cleanup is needed to keep repo size down. 

    Posted via email from Matt's thoughts

    Sunday, May 15, 2011

    iSkinned with Decalgirl

    When I still had a PSP, the thing attracted dirt and fingerprints like mad and it felt like I spent more time cleaning it than playing on it. I tried a couple of skin solutions, but they all had some issue or other-too thick so the analog stick got blocked, began peeling off too easily, etc. Then I stumbled on decalgirl.com, read rave reviews about their skins and decided to import a kit. It turned out to be a great choice, and together with a screen guard changed the way I used my PSP.
    So when @justinpaver was going to be heading over from the states for a visit I jumped at the chance to have him bring some decalgirl skins over.
    In addition to skinning my and Nat's phones, I got a skin kit for my MacBook too.
    Applying the skins is not a task to be rushed, I had to set aside about 30 minutes per device. The phone kits also come with a code for a matching desktop background, which is pretty cool (pity the same isn't available for the MacBook). The result is pretty cool, and with no sticky residue being left behind on the devices after the covers are removed, it's a great way to keep them in good nick.

    Posted via email from Matt's thoughts

    Wednesday, March 23, 2011

    The Gift Of Life - Thanks Dad

    Ten years ago today, I was on the receiving and of a miracle. A miracle made possible by my Dad's generosity, the awesome skills of medical professionals and the Lord's good grace. After spending my life to that point dealing with sick kidneys, they finally failed me completely and I needed a new kidney - which my Dad selflessly offered to donate. I was 21 at the time, and without the new kidney I quite simply wouldn't be here today-or at least would be living my life dependent on a dialysis regime (which is not fun). My kidney is now ten years old and going strong.

    Those of you that know me, and didn't know about this are quite possibly amazed (most people are when they find out), because I live a normal and healthy life. I don't seem 'sick' - and that's because I'm not. The transplant gave me what I'd never had- a completely healthy kidney- and I've been careful to look after it since. The negative "effects" are limited to regular checkups with a specialist and taking daily immuno-suppressants, not a bad deal :)

    I'm one of the lucky ones. There are hundreds, if not thousands of people of all ages, from all walks of life, that desperately need transplants and can't get one from a family member for whatever reason. They have their names on a list, and are hoping and praying to be the lucky recipient of a 'cadaver' organ. 

    YOU CAN GIVE THESE PEOPLE A NEW LIFE LIKE I GOT. All you need to do is:
    1. Register as an organ donor with your local donor organization. In SA that's the Organ Donor Foundation (http://www.odf.org.za)
    2. Carry your donor card in your wallet or bag at all times
    3. Discuss your choice with your family. They will ultimately be the ones that have to give the go ahead to harvest your organs, so they need to know about and your wishes and know to respect them.
    Please, don't believe the rubbish some people insist on spreading about donation: 
    • Doctors and paramedics will not give you inferior treatment to secure organs.
    • Your organs will not be sold for some crazy profit to the highest bidder. 
    • Your body will be treated with the utmost respect and will be perfectly fine for open casket display if that's what you want.

    Posted via email from Matt's thoughts

    Tuesday, January 25, 2011

    New arrivals

    We adopted these two from someone moving to a smaller place and looking for a good home for them. The grey one is Misty and the other is MJ.

    Posted via email from Matt's thoughts

     

    Copyright 2007 All Right Reserved. shine-on design by Nurudin Jauhari. and Published on Free Templates

    Afrigator