Created
November 7, 2017 15:38
-
-
Save luke161/2f841f3b746b045718985ab8b2d15534 to your computer and use it in GitHub Desktop.
Unity editor extension to increment iOS build number after each build.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEditor.Callbacks; | |
public class AutoIncrementBuildNumber | |
{ | |
[PostProcessBuild] | |
public static void OnBuildComplete(BuildTarget buildTarget, string pathToBuiltProject) | |
{ | |
if (buildTarget==BuildTarget.iOS) { | |
PlayerSettings.iOS.buildNumber = (int.Parse (PlayerSettings.iOS.buildNumber) + 1).ToString(); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment