I'm working on a mobile game (Android and iOS) using Unity 2019.1. I'm using git as my version control system and I would like to know how to save my current git commit hash into a C# script.
I would like to save my current git commit in order to display it on the screen (so I would know instantly at which version of the game I'm looking at). Right now instead of current git commit hash I'm using Application.buildGUID, however this isn't working for me, because builds based on the same commit can have different GUIDs.
How can I do that?
git rev-parse HEADpublic static class ApplicationInfo { public const string AppVersion = "1.0.0"; }and rather update that one once you have a new minor or major release..