Using Auto Version Intrementor with Unity 3D

When developing any kind of software, be it game, application and etc. It is both useful and important that the version is updated per release. This is to differentiate each version, easier maintenance, and many other reasons. The version needs to be incremented primarily based on the version naming convention being adapted for the project. Commonly, the version consists of major, minor, and patch; and it should be incremental respectively to the release.

The same goes for when developing for instance a game in Unity 3D. The Unity 3D API for the version is a string data type. Thus making it possible to use whatever naming convention. The only exception is for the bundle version code. Though, the tool will calculate the version number based on the major, minor, and patch values while preventing getting conflicting version codes.

PlayerSettings.Android.bundleVersionCode = settings.MajorVersion * 10000 + settings.MinorVersion * 1000 + settings.PatchVersion;

Auto Version Incrementor Setting Provider

The auto version incrementor package is a simple setting provider that attempts to automate some of the version incrementing processes. It can update the patch version on events such as on play and script compilation. In addition, there is easy access to the menu item for incrementing either major, minor, or patch manually.

The source code, including the installation instructions, can be found at GitHub.

Features

Additionally, setting the state of the application, such as pre-alpha, alpha, prebeta, beta, release candidate, and finally release. The version will increment the player setting version field. See the following.

Player Setting, highlighting the version of the game project.

In the project setting, under the tab Version incrementor settings, the settings for the auto incrementor can be found. It will present with settings on what event it both supports and will increment on the patch variable. In addition, the current version for the major, minor, patch, and release state that can be overridden manually.

The Version Auto Incrementor setting provider window.

Finally, the tool is still in development and thus has room for improvements.