Guest User

Untitled

a guest
May 23rd, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #if UNITY_EDITOR
  2. using UnityEditor;
  3. using UnityEngine;
  4. using UnityEditor.Build;
  5.  
  6. #if UNITY_2017
  7. class AutoHideSplashScreen : IPreprocessBuild
  8. {
  9. public int callbackOrder { get { return 0; } }
  10. public void OnPreprocessBuild(BuildTarget target, string path) {
  11. // Do the preprocessing here
  12. if (Application.HasProLicense()) {
  13. Debug.Log("UNITY IS PRO!\n Deactivating SplashScreen");
  14. PlayerSettings.SplashScreen.show = false;
  15. PlayerSettings.SplashScreen.showUnityLogo = false;
  16. } else
  17. Debug.Log("Unity is not pro :(");
  18. }
  19. }
  20. #endif
  21.  
  22. #if UNITY_2018
  23. using UnityEditor.Build.Reporting;
  24.  
  25.  
  26. class AutoHideSplashScreen : IPreprocessBuildWithReport
  27. {
  28. public int callbackOrder { get { return 0; } }
  29. public void OnPreprocessBuild(BuildReport report) {
  30.  
  31. if (Application.HasProLicense()) {
  32. Debug.Log("UNITY IS PRO!\n Deactivating SplashScreen");
  33. PlayerSettings.SplashScreen.show = false;
  34. PlayerSettings.SplashScreen.showUnityLogo = false;
  35. } else
  36. Debug.Log("Unity is not pro :(");
  37. }
  38. }
  39. #endif
  40. #endif
Add Comment
Please, Sign In to add comment