Exemple #1
0
        public void OnPostprocessBuild(BuildReport report)
        {
            if (!BuildNumberProcessor.GetAutoIncrementEnabled())
            {
                return;
            }

            switch (report.summary.result)
            {
            case BuildResult.Failed:
                EditorApplication.delayCall += () =>
                {
                    Debug.Log("BuildNumber: Reverting build number due to build error...");
                    BuildNumberProcessor.Decrement();
                };
                break;

            case BuildResult.Cancelled:
                EditorApplication.delayCall += () =>
                {
                    Debug.Log("BuildNumber: Reverting build number as build was cancelled...");
                    BuildNumberProcessor.Decrement();
                };
                break;
            }
        }
Exemple #2
0
 public static void Decrement()
 {
     BuildNumberProcessor.Decrement();
 }