We have a team of three coders working together who are relatively new to Unity. One of the gentleman was wondering what the best practices were in regards to keeping the code organized and sharing code between the developers. Would using Subversion be the best practice? Thanks.
SVN, GIT, etc would be the best to share code, organization is personal preference.
In addition to what EliteMossy said,
- Namespaces
- Commenting (Very helpful in group scenarios)
are great for organizing codes.
I find that when working with together with more programmers on one project, it is important to
also make good comments in the scripts:
- Start with a description of what this script does
- Leave a comment, telling who the author of this script is
- With each function, leave a comment on what it does
- Keep nice and consistent spacing between lines of code
As well as SVN or GIT try to have an agreement between each other on coding style. E.G how you use brackets:
Allman Style( i like this one )
while (x == y)
{
something();
somethingelse();
}
GNU Style
while (x == y)
{
something ();
somethingelse ();
}
I find using the same style really helps.