using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Scripting; [Preserve] public class SkipUnityLogo { [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)] private static void CancelSplashScreen() { // iOS 16+ 上 Task.Run 在 BeforeSplashScreen 阶段可能无法及时调度, // 改用同步调用,确保 SplashScreen 被可靠停止。 try { SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate); } catch (System.Exception) { // 如果 SplashScreen 已经不存在或已被禁用,忽略异常 } } }