From 78c688e1f2a95349bea86aefa412a6db8a5d4046 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 30 九月 2026 17:01:31 +0800
Subject: [PATCH] 0312 增加launch的抖音埋点
---
Assets/Launch/Manager/LocalResManager.cs | 7 ++++++-
Assets/Launch/Launch.cs | 19 +++++++++++++++++--
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/Assets/Launch/Launch.cs b/Assets/Launch/Launch.cs
index 1b1342e..a3ec01a 100644
--- a/Assets/Launch/Launch.cs
+++ b/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)
diff --git a/Assets/Launch/Manager/LocalResManager.cs b/Assets/Launch/Manager/LocalResManager.cs
index c02863d..3a29fac 100644
--- a/Assets/Launch/Manager/LocalResManager.cs
+++ b/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;
--
Gitblit v1.8.0