Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if UNITY_EDITOR
- using UnityEditor;
- using UnityEngine;
- using UnityEditor.Build;
- #if UNITY_2017
- class AutoHideSplashScreen : IPreprocessBuild
- {
- public int callbackOrder { get { return 0; } }
- public void OnPreprocessBuild(BuildTarget target, string path) {
- // Do the preprocessing here
- if (Application.HasProLicense()) {
- Debug.Log("UNITY IS PRO!\n Deactivating SplashScreen");
- PlayerSettings.SplashScreen.show = false;
- PlayerSettings.SplashScreen.showUnityLogo = false;
- } else
- Debug.Log("Unity is not pro :(");
- }
- }
- #endif
- #if UNITY_2018
- using UnityEditor.Build.Reporting;
- class AutoHideSplashScreen : IPreprocessBuildWithReport
- {
- public int callbackOrder { get { return 0; } }
- public void OnPreprocessBuild(BuildReport report) {
- if (Application.HasProLicense()) {
- Debug.Log("UNITY IS PRO!\n Deactivating SplashScreen");
- PlayerSettings.SplashScreen.show = false;
- PlayerSettings.SplashScreen.showUnityLogo = false;
- } else
- Debug.Log("Unity is not pro :(");
- }
- }
- #endif
- #endif
Add Comment
Please, Sign In to add comment