Search Unity

Discussion Best Version Control for Unity

Discussion in 'Unity Version Control' started by Koval331, Apr 5, 2019.

  1. Koval331

    Koval331

    Joined:
    Feb 3, 2019
    Posts:
    114
    Yes, I know there is no the best tool, etc. All I want is your advice. Here are my situation and questions:
    • I want to choose between Git and Perforce.
    • I heard that Perforce is an industry standard but some people on forums say they hate it. Why is that so?
    • I heard that Perforce is much harder to work with when it comes to branches. Is it that horrible?
    • Some people say that Git is not ready for studios despite some of its pros. Is that right as for now?
    • Has something changed as for now with these two tools?
    All info I found was from 2 or more years ago so I want to check if something has changed since then.
     
    leoklima and Gusts92 like this.
  2. MFKJ

    MFKJ

    Joined:
    May 13, 2015
    Posts:
    264
    Hi, did you find the answer? Can you share your thoughts? We are also looking for the best solution with unity. Thanks
     
    waterrmalann likes this.
  3. Siccity

    Siccity

    Joined:
    Dec 7, 2013
    Posts:
    255
    Git. I use this professionally within my company, and I use it personally. It's good for business, it's good for opensource. Merging is a breeze, and getting help is easy. It is very rare to bump into someone using Perforce. I recommend starting with a client like git-fork. I haven't used Perforce myself but I see no reason to use anything other than Git, it's perfect.
     
  4. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,073
    The problem with unity and source control is that you want to store not only source but also all those GB of assets.

    We used Git in our 5 years project. We had to partition it into multiple git projects in order to push it all onto the server.
     
    FavisINC and AlanMattano like this.
  5. Siccity

    Siccity

    Joined:
    Dec 7, 2013
    Posts:
    255
    This is why git-lfs was made. LFS stands for Large File Storage. It puts all your binaries on a separate FTP server and only diffs the links in the git history. LFS is a MUST when using git with unity.
    There are plenty of different ways to install LFS depending on your git client, but here's a cli tutorial:
    https://github.com/git-lfs/git-lfs/wiki/Tutorial
     
  6. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    You talking about remote storage though right? I made a git repository for my game that's over 2GB right now and tried to push it to bitbucket but failed because there limit is 1GB. I think if your keeping your repository local you can just use git.
     
  7. Siccity

    Siccity

    Joined:
    Dec 7, 2013
    Posts:
    255
    LFS pushes to a separate FTP server which is usually at Bitbucket or Github. They both have limits on how much space you have on your free account. There is probably a way to setup git to use your own FTP server, but i haven't looked into it.
     
  8. drslaphead

    drslaphead

    Joined:
    Feb 7, 2017
    Posts:
    3
    I've used perforce and i've used GIT, both are based on UNIX, those die hard people that love to type on a command line because they consider that work! as of 8/6/2020 there is no graphical interface that will actually work great, the unix peeps still have an edge on the whole VCS apps, Microsoft Team Server is the best if you want graphical interfaces, Perforce is practically useless in unity as too is GIT, it don't work and will NEVER do what you want, it's confusing and pointless, NONE of the tutorials will help, it's designed for die hard hackers and unix coders that love to type 200 character line items. i suggest just make backup file and ignore VCS until source control comes out of the 70's
     
  9. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    655
    I recommend Plastic SCM.

    As @drslaphead pointed out, Git is very developer oriented. When I tried Git+Git-LFS late 2018, I had to install multiple softwares, activate it through command prompts and had no ideas what was my current storage print, the pricing, the limitations or even if it was configured properly. I can't work with that.

    The problem with git in my experience is that it's a tool designed by developers, for developers, and while it's great if you're working 100% on code and fluent with everything code based, it won't do the job for a Unity project because it needs to be usable by everybody.

    That's where Plastic is different. It is designed for projects containing all kinds of assets like textures or 3Dmodels while still retaining branching and merging on files that will allow it.
     
  10. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    How about Unity Collaborate?
     
  11. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
    For smaller teams, should definitely look into Collaborate.

    If you're a part of a mid or larger sized team, Plastic may be the best option.
     
    uotsabchakma, XMIEmpty and Fotal like this.
  12. MFKJ

    MFKJ

    Joined:
    May 13, 2015
    Posts:
    264
    Please define a smaller team?
     
  13. Rarceth

    Rarceth

    Joined:
    Oct 15, 2015
    Posts:
    41
    I'd define smaller teams as 1-10 people. Usually an indie studio, or just a rando group working on a game.
    When you start to get more corporate with it, you see company scale implementations of software packages like Atlassian, AWS, etc. For example, my company uses Atlassian products for issue tracking, version control and documentation, while using the Microsoft products such as Teams, Sharepoint, and Azure for more administration based things.

    Small teams CAN work on big games though, so I'd say if your game is getting beyond 10GB, you probs want to look into something other than git. Im doing research into Plastic now because im running our project in 3 different git repo's simultaneously to cope with reserialisation issues
     
    MFKJ likes this.
  14. DefyGravity

    DefyGravity

    Joined:
    Mar 26, 2020
    Posts:
    6
    We started using Perforce. Then moved to Visual Studio Team Foundation Server. We had problems with both at times where Perforce or TFS thinks you have the latest version of a file when you really didn't and had to force download that file.

    We are now using Git and LFS. It's working for our multiple teams but it has the largest learning curve.
     
  15. MFKJ

    MFKJ

    Joined:
    May 13, 2015
    Posts:
    264
    Normally our projects are more than 10GB. So we don't consider Git?
     
  16. MFKJ

    MFKJ

    Joined:
    May 13, 2015
    Posts:
    264
    Is Git working fine?
     
  17. DefyGravity

    DefyGravity

    Joined:
    Mar 26, 2020
    Posts:
    6
    Yes it's working fine, going to check out Plastic SCM though, looks pretty slick.
     
  18. stropheum060

    stropheum060

    Joined:
    Sep 11, 2018
    Posts:
    1
    I understand that you've never personally bumped into someone using Perforce, but it's incredibly ubiquitous especially in larger studios. Every studio I've worked at thus far that's been greater than 20 people has used Perforce
     
  19. baraterahul48

    baraterahul48

    Joined:
    Jun 20, 2021
    Posts:
    3
    hey there, can you tell us how to use plastic scm, i tried to find tutorials and videos on youtube but didn't found anything useful. it will be really helpful if you can link a guide or something where i can learn how to use it. Thanks
     
  20. finnmudwards

    finnmudwards

    Joined:
    Mar 11, 2021
    Posts:
    1
    I have nothing but problems using git with unity, it cannot handle merge conflicts and breaks constantly due to unity's lockfile
     
  21. dgaban

    dgaban

    Joined:
    Jan 17, 2018
    Posts:
    6
    after signing up for plastic scm i can't believe anyone would choose to use anything besides it. it integrates perfectly with unity (except for one minor bug which they said they've fixed and will release soon). git would be an absolutely nightmare to use with Unity imo.
     
  22. seidgaparov

    seidgaparov

    Joined:
    Jul 18, 2013
    Posts:
    18
    Plastic is Sh** sorry for my english. W are working with it for 6 months, and there is no week without new bugs/errors from plastic, I personally redownloaded full project 2 times. Our project size is 200GB, it's -1 day. We have dedicated servers for testing multiplayer, and imagine repair plastic on every machine every months, spending 3+ hours finding solution. I STRONGLY DONT RECOMMEND. At that moment we are releasing game, and we have bug with plastic it cant handle pushing 100000 files (addressables, terrain chunks, etc), we have differences with colleagues which we cant push
     
  23. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    655
    Did you open a thread on the Plastic forums? I'd like to follow it.
     
    EvgeniyKonyshock likes this.
  24. mgstauff

    mgstauff

    Joined:
    Sep 6, 2017
    Posts:
    59
    It seems like nobody in this thread brought up the elephant in the room - merging and diff'ing unity scene and prefab files. Such a PIA with git - anyone have a solution? I'm looking at Unity Teams and Plastic now to see if they can do meaningful diff and merge tools for these cases. Anyone have thoughts on this?
     
  25. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    655
    Merging haven't been an issue with either plastic or git. This might be why people don't talk about it.

    Try plastic and ask for help on the forums if you encounter any issues.
     
    Wolfram likes this.
  26. mgstauff

    mgstauff

    Joined:
    Sep 6, 2017
    Posts:
    59
    You mean diff'ing and merging scene and prefab files hasn't been an issue for you? What am I missing? The diff's for these files are meaningless to me, and I've read that merging them can cause hard-to-detect problems.

    Edit: I'm talking about with git.
     
  27. Fred_1

    Fred_1

    Joined:
    Mar 4, 2017
    Posts:
    1
    You need to use Unity Smart Merge as your git merge tool.
    This makes merge conflicts much easier.
    https://gist.github.com/j-mai/4389f587a079cb9f9f07602e4444a6ed
    https://docs.unity3d.com/Manual/SmartMerge.html
     
  28. mgstauff

    mgstauff

    Joined:
    Sep 6, 2017
    Posts:
    59
  29. matniedoba3d

    matniedoba3d

    Joined:
    Aug 10, 2021
    Posts:
    7