{"id":307,"date":"2010-05-14T13:19:02","date_gmt":"2010-05-14T13:19:02","guid":{"rendered":"http:\/\/www.qcfdesign.com\/?p=307"},"modified":"2010-05-14T13:19:02","modified_gmt":"2010-05-14T13:19:02","slug":"unity-meet-svn-svn-meet-unity","status":"publish","type":"post","link":"http:\/\/www.qcfdesign.com\/?p=307","title":{"rendered":"Unity, meet SVN. SVN, meet Unity."},"content":{"rendered":"<p>Actually, neither app needs to meet the other at all. That&#8217;s the nice part about file-based versioning systems like Subversion: You can just lob them at a particular part of your drive and they just work. Most of the time.<\/p>\n<p>Now that we&#8217;re starting to focus on building a Unity version of DD, we&#8217;re running into a few problems. Firstly, we&#8217;re a distributed team, so that means we NEED to have some sort of versioning in place. Frankly, even if we were always in the same office, versioning systems are so useful that there&#8217;s no excuse NOT to use one. Game Maker&#8217;s been great for prototyping the game so far, but it&#8217;s sorely limiting because having multiple people working on one GM project is tricky (and we&#8217;re <a href=\"http:\/\/www.nag.co.za\/forums\/showthread.php?t=9479\" target=\"_blank\">pretty darn good at it<\/a>). For instance, I built the interface as stand-alone as I could and I still needed to freeze the code for 4 days to merge it all into the version Nandrew was working on.<\/p>\n<p>Anyway, back to Unity. This being the first time we&#8217;ve used the package, we&#8217;ve found out that it does some things that make it not play nice with versioning systems. Like continuously rewriting needed object metadata in a constantly changing set of random directories. Which is sort of a dick move when you think about it. Apparently the Pro license lets you force Unity to write that metadata as text next to the resources themselves, nixing the random rewriting\/renaming and apparently letting SVN do its job as advertised.<\/p>\n<p>We&#8217;ll probably switch up to the Pro version of Unity at some point over the next few months, but until then we really needed to get something working so that we could all start taking bites out of the todo list that&#8217;s growing alarmingly fast. There are a <a href=\"http:\/\/forum.unity3d.com\/viewtopic.php?t=43119\" target=\"_blank\">few<\/a> <a href=\"http:\/\/forum.unity3d.com\/viewtopic.php?p=285626\" target=\"_blank\">posts<\/a> <a href=\"http:\/\/answers.unity3d.com\/questions\/1235\/version-control-workflow\" target=\"_blank\">out there<\/a> about versioning and Unity, there&#8217;s even <a href=\"http:\/\/http:\/\/unity3d.com\/support\/documentation\/Manual\/ExternalVersionControlSystemSupport.html\" target=\"_blank\">an official how-to<\/a> if you&#8217;re using Pro. Unfortunately the consensus seems to be that versioning and free Unity is messy at best and non-functional at worst&#8230;<!--more--><\/p>\n<p>We spent some time poking around and brute-forcing limited copies of our embryonic DD in Unity to see the bare minimum that we needed in order to reconstruct the game correctly in the editor. Turns out that all you need is everything under Assets and the Library\/Meta directories, the contents of Library itself don&#8217;t seem to matter too much. This bears out what people have been saying regarding how Pro handles meta info&#8230; But, due to the constant rewriting of the Meta directory (even when you&#8217;re not really doing squat in the editor itself), we can&#8217;t just point SVN at the dir and let it handle everything &#8211; we&#8217;d be swimming in hordes of useless\/redundant updates and conflicts.<\/p>\n<p>We&#8217;ve settled on what appears to be the least hassle so far:\u00a0 Zip up the entire Library directory, add the zip to the repository and ignore the directory itself. Then, when anyone adds something via the editor (we&#8217;re mostly adding elements via code at the moment), they zip up their version of Library and let the repository propagate that out to everyone else. If the zipfile changes, we have to individually unzip it and establish a new &#8220;base&#8221; that Unity can do its meta info dance on top of as much as it wants. Yes, this means that we can essentially only have one person in charge of major changes via the editor at any particular point, but at least we can all be working on code and have at least semi-normal version control in place&#8230;<\/p>\n<p>If anyone has a better way to get the free version of Unity and SVN playing nice, please let us know!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Actually, neither app needs to meet the other at all. That&#8217;s the nice part about file-based versioning systems like Subversion: You can just lob them at a particular part of your drive and they just work. Most of the time. Now that we&#8217;re starting to focus on building a Unity version of DD, we&#8217;re running [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[19,18,28],"_links":{"self":[{"href":"http:\/\/www.qcfdesign.com\/index.php?rest_route=\/wp\/v2\/posts\/307"}],"collection":[{"href":"http:\/\/www.qcfdesign.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.qcfdesign.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.qcfdesign.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.qcfdesign.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=307"}],"version-history":[{"count":0,"href":"http:\/\/www.qcfdesign.com\/index.php?rest_route=\/wp\/v2\/posts\/307\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.qcfdesign.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.qcfdesign.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=307"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.qcfdesign.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}