三国卡牌客户端基础资源仓库
hch
2026-06-28 77dd69e22378ded534f17ef98a397dd791cb4bd1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 已经不存在或已被禁用,忽略异常
        }
    }
}