三国卡牌客户端基础资源仓库
hch
2026-09-30 78c688e1f2a95349bea86aefa412a6db8a5d4046
0312 增加launch的抖音埋点
2个文件已修改
26 ■■■■■ 已修改文件
Assets/Launch/Launch.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Manager/LocalResManager.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Launch.cs
@@ -362,11 +362,16 @@
        TraceBegin("Start", "冷启动入口");
        Debug.LogWarning("[Launch] Start");
    #if UNITY_WEBGL && DOUYINMINIGAME && !UNITY_EDITOR
#if UNITY_WEBGL && DOUYINMINIGAME && !UNITY_EDITOR
        TraceBegin("PlatformBootstrap", "平台SDK初始化");
        bool sdkReady = await PlatformBootstrap.InitAsync();
        TraceEnd("PlatformBootstrap", "平台SDK初始化", $"结果: SDK={(sdkReady ? "就绪" : "未启用/失败")}");
    #endif
#endif
#if UNITY_WEBGL && DOUYINMINIGAME
        PlatformBootstrap.ReportEvent("launch_1_start");
#endif
#if UNITY_WEBGL
            await VersionConfigEx.Get();
@@ -604,6 +609,12 @@
        if (_hotUpdateAss == null)
            _hotUpdateAss = System.AppDomain.CurrentDomain.GetAssemblies().First(a => a.GetName().Name == "Main");
#endif
#if UNITY_WEBGL && DOUYINMINIGAME
        PlatformBootstrap.ReportEvent("launch_5_startgame");
#endif
        LocalResManager.step = LocalResManager.LoadDllStep.None;
        // m_UICanvas.gameObject.SetActive(false);
        DestroySingleton();
@@ -759,6 +770,10 @@
        TraceEnd("ReadDllBytes", "热更DLL加载", $"DLL数量: {ALL_DLL_NAMES.Length}");
        callback?.Invoke();
#if UNITY_WEBGL && DOUYINMINIGAME
        PlatformBootstrap.ReportEvent("launch_4_dll");
#endif
    }
    private async UniTask LoadSingleDllAsync(ResourcePackage dllPackage, string dllName)
Assets/Launch/Manager/LocalResManager.cs
@@ -444,7 +444,9 @@
        {
            return;
        }
#if UNITY_WEBGL && DOUYINMINIGAME
        PlatformBootstrap.ReportEvent("launch_2_center");
#endif
        // resource_url 会决定 YooAsset HostPlayMode 的远端根路径,必须在初始化 YooAsset 前写入。
        TryApplyCdnUrlFromVersionInfo();
@@ -536,6 +538,9 @@
#endif
        await InitializeYooAssetAndEnterReadBytesAsync();
        LogTiming("LoadInitialFunctionAndStartAsync", startTime);
#if UNITY_WEBGL && DOUYINMINIGAME
        PlatformBootstrap.ReportEvent("launch_3_yoo");
#endif
    }
    private const int INIT_FUNC_MAX_RETRY = 5;