6 ms·
Version control on Unity isn't as bad as you describe. Go to Edit > Project Settings > Editor, then set Version Control to Metafiles. If you have a Pro license,
by mtinkerhess 14y ago
Version control on Unity isn't as bad as you describe. Go to Edit > Project Settings > Editor, then set Version Control to Metafiles. If you have a Pro license, also set Asset Serialization Mode to Force Text. The downside is that this litters your project with .meta files, but that lets you work with external version control pretty easily.
Edit: You should also exclude the Library folder from your VCS, because with metafiles enabled the Library is just a local cache.
- reitzensteinm 14y agoYou're responding to an argument I didn't make. Version control works fine. The problem is that there is no method to build libraries and share them between multiple projects, since all the code needs to be under the Assets folder of each project. There is no support for classpaths. If you update the code in one project, you have to copy the file to the other. Or have some equivalent method of doing so outside of Unity. Prior to Unity 4, people were using symlinks to accomplish this, but Unity 4 disabled them on Windows to match the OS X behavior (this is described in the post I linked).
- giulianob 14y agoCan you just checkout a subrepo into your assets?
- acgourley 14y agoYes, this is the only way the handle it. Git subrepos make this a hassle though, in our experience. It's the one thing that SVN would do much better.
- bryanlarsen 14y agoHave you tried git subtrees? They are so much nicer than git submodules in many ways. http://news.ycombinator.com/item?id=3926683 http://news.ycombinator.com/item?id=3926683
- acgourley 14y agoThanks for the pointer. I've read a few articles thanks you to. It still seems awfully complex and demands very proficient git usage to do even simple operations. I don't think that's suitable.. but I'm curious are you using it with Unity?
- bryanlarsen 14y agoNot with Unity. One big advantage is that git subtree has is that not everybody has to be proficient with it, you can designate someone to set it up and to periodically push the subtrees, and everybody else can ignore it. That's not quite true; they should split their commit so they don't span trees. But it's not a requirement, it just makes things a lot nicer.
- mtinkerhess 14y agoSorry about that, I thought by different projects you meant the same project on different machines. Sharing libraries between projects, now that's an interesting problem. I think I'll go have my morning coffee now.