Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. #if UNITY_EDITOR && UNITY_ANDROID
  2. using UnityEditor;
  3. using UnityEditor.Build;
  4. using UnityEditor.Build.Reporting;
  5.  
  6. class PreBuild : IPreprocessBuildWithReport
  7. {
  8.     public int callbackOrder => 0;
  9.  
  10.     public void OnPreprocessBuild(BuildReport report)
  11.     {
  12.         if (EditorUtility.DisplayDialog("Increment Android's bundle version code?", "Increment Android's bundle version code?", "Yes my man", "No my dude"))
  13.             PlayerSettings.Android.bundleVersionCode++;
  14.     }
  15. }
  16. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement