Wednesday, March 06, 2013
Using Version Control when learning Unity3D
I've been looking for what I think may be the next up and coming browser plug-in and all around multi-platform framework.
I got started learning Unity3D during the end of January 2013. Using the last version of Unity 3.x, Unity 3.5.7. There are lots of great tutorials out there, from the corny tornado twins (http://www.youtube.com/playlist?list=PL11F87EB39F84E292), to the overly detailed cgcookie.com.
The biggest hurtle for me was figuring out source control. What files should be versioned and which shouldn't.
- The most important thing to do is to turn on Meta Files at the start of a new project. Inside Unity3D go to Edit->Project Settings->Editor and change Mode from "Disabled" to "Meta Files". This allows Unity to no longer relay on any of the contents of a Unity3D projects Library folder.
- If everyone on your team has Unity Pro licence, you should also set Asset Serialization to "Force Text". This stores asset files in an xml form. This allows a source control conflict of asset files to be resolvable.
- Unity3D does some unexpected things like re-generating the VisualStudio *.sln and *.csproj files. I'm not sure when the re-generation happens, but the key take-away was that *.sln and *.csproj related to the unity project should not be under version control. However, *.sln and *.csproj files not connected to Unity, like a Unit Test project, should still be under version control.
### start Unity3D .gitignore # The Unity3D /Library/* ignore requires Meta Files to be turned on (Enable Meta files in Edit->Project Settings->Editor) # ref: http://docs.unity3d.com/Documentation/Manual/ExternalVersionControlSystemSupport.html *.unityproj *.DS_Store /Build/* /Library/* /[Oo]bj/* /[Tt]emp/* # VisualStudio specific files that are generated by Unity3D /*.sln /*.csproj # Include other VisualStudio projects like Unit Test projects by uncommenting and customizing the next line #!/UnitTests/*.csproj #pidb files are only for code completion caching data according to: # http://stackoverflow.com/questions/1022111/what-are-monodevelops-pidb-files rpsUnity3D/*.pidb rpsUnity3D/*.userprefs ### end Unity3D .gitignore
Subscribe to Posts [Atom]