Git Commands From Unity

For most of my projects I use git for version control, sometimes I use custom scripts to version my builds so they include the current commit hash. To do this in Unity I use the .Net Process class in an editor script to launch the git command.

Unity IPreprocessBuild & IPostprocessBuild

In Unity you will find yourself wanting to do some process before you build a game, whether it be Asset Bundles, moving platform specific assets to Streaming Assets or just ensuring the build version information is up to date.