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; } }
public static void Decrement() { BuildNumberProcessor.Decrement(); }