赞
踩
创建一个 SkipUnityLogo.cs类,内容如下:
- #if !UNITY_EDITOR
- using UnityEngine;
- using UnityEngine.Rendering;
-
- [UnityEngine.Scripting.Preserve]
- public class SkipUnityLogo
- {
- [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
- private static void BeforeSplashScreen()
- {
- #if UNITY_WEBGL
- Application.focusChanged += Application_focusChanged;
- #else
- System.Threading.Tasks.Task.Run(AsyncSkip);
- #endif
- }
-
- #if UNITY_WEBGL
- private static void Application_focusChanged(bool obj)
- {
- Application.focusChanged -= Application_focusChanged;
- SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
- }
- #else
- private static void AsyncSkip()
- {
- SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
- }
- #endif
- }
- #endif
即可去除
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。