- Home /
What needs to go into source control to share a project? (UnityPro)
We are using Unity Pro & SVN.
If I read the docs correctly I should not put my Library folder under source control. What should I have under source control so that other programmers can checkout, build and run the project? My structure looks like this.
Game\ Assets\ Standard Assets\ Plugins\ Game.unity Library\ cache\ metadata\ ScriptAssemblies\ lots of *.asset files AssetVersioning.db assetDatabase3 assetservercachev3
I currently have everything under source control. And I feel this is just wrong - should I really have cache files & ScriptAssemblies under SVN?
EDIT: Has anyone else had issues where they needed to include the cach folders?
Can you confirm that you are actually seeing .meta files next to each asset in the Assets folder? otherwise, external version control is probably not enabled properly, and will not work.
Answer by Tetrad · May 07, 2010 at 11:03 PM
http://unity3d.com/support/documentation/Manual/ExternalVersionControlSystemSupport.html
Make sure you have the project set up to support external version control (edit->project settings->editor).
Yes, I followed these instructions and the other programmers could not generate a working version of the game from what was included in SVN. It required me to check in everything before it would work for them. So there is some disconnect between the docs & my project.
Chris, if you guys can reproduce that, we'd love to take a look at the project. Versioning the cache and metadata folders defenitely is wrong, and while it may seem to work initially, will always end up breaking your project.
When deleting the cache & metadata and submitting to SVN the game objects lose connections to their $$anonymous$$onoBehaviors. All the GameObjects now say "$$anonymous$$issing ($$anonymous$$ono Script)". This is what breaks the game for the other programmers.
I must say we have the exact same problem here. Scene/Project put over SVN without cache/metadata loses all it's references toward the asset data. It's not only the Scripts that are missing, but all the data. ($$anonymous$$esh, texture, etc) Basicly, no references at all.
I do feel putting metadata and cache under control might be wrong, but I don't really have anyother solution. You say it will break my project is the cache/meta is under control, how would it break it?
Is there another file aside .asset that should be under source control?
Answer by MBoon · Jul 16, 2012 at 08:25 PM
Is this only possible with the Pro version? I tried doing 'Checkout' from within MonoDevelop, but it doesn't work as it's stupid and creates a new solution for the project I check out. (This 'Select Repository' dialog has some serious issues, is this an untested alpha feature or what?)
I'm wondering if this is going to work anyway. Obviously you'll want both your Unity project AND your shared code in your source-control system. However, if you do a checkout of a project into a sub-directory of another versioned project you can no longer do recursive updates of the containing project. I didn't use Git much, but SVN for sure will complain about the path being wrong. And without recursive updates you're pretty much hosed.
I don't have the Pro version so I don't know for sure how this is going to work. But it would be particularly painful if I go through the bureaucracy of have my company acquiring a Pro license just to find out what I need it most for is not going to work.