Exemple #1
0
        /*
         * Private.
         */

        private static void UpdateMenu()
        {
            var enabled = BuildNumberProcessor.GetAutoIncrementEnabled();

            Menu.SetChecked(AutoIncrementEnabledMenuItem, enabled);
            Menu.SetChecked(AutoIncrementDisableMenuItem, !enabled);
        }
Exemple #2
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 #3
0
        public void OnPreprocessBuild(BuildReport report)
        {
            if (BuildNumberProcessor.GetAutoIncrementEnabled())
            {
                Debug.Log("BuildNumber: Auto Increment");
                BuildNumberProcessor.Increment();
            }

            if (BuildNumberProcessor.TryUpdateBuildNumberFromProjectSettings())
            {
                Debug.Log("BuildNumber: Build number updated in Player Settings");
            }
        }
Exemple #4
0
 public static bool AutoIncrementDisabledValidation()
 {
     return(BuildNumberProcessor.GetAutoIncrementEnabled());
 }