三国卡牌客户端基础资源仓库
hch
2026-10-15 f24693f76ef0bd7ed993c968e20aed528016b012
0312 关闭大部分调试输出,如果要打开启用 #if UNITY_EDITOR
11个文件已修改
260 ■■■■■ 已修改文件
Assets/Launch/Config/InitialFunctionConfig.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Config/UrlRemoteServices.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Config/WebGLRemoteConfig.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/HttpRequest/HttpBehaviour.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Launch.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Manager/LocalResManager.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Manager/YooAssetInitializer.cs 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/SDK/XingwanTTSDK.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/UI/LaunchWins/LaunchExWin.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Utility/LaunchUtility.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/NativeWebSocket/Assets/WebSocket/WebSocket.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Config/InitialFunctionConfig.cs
@@ -145,7 +145,7 @@
                }
            }
            inited = true;
            Debug.Log("InitialFunctionConfig Init Finished line = " + rawDatas.Count);
            // Debug.Log("InitialFunctionConfig Init Finished line = " + rawDatas.Count);
        }
    }
Assets/Launch/Config/UrlRemoteServices.cs
@@ -74,7 +74,7 @@
            return;
        _loggedUrlCount++;
        Debug.Log($"[UrlRemoteServices][Diag] {source} file='{fileName}' url='{url}'");
        // Debug.Log($"[UrlRemoteServices][Diag] {source} file='{fileName}' url='{url}'");
    }
    private static bool ShouldLog(string fileName)
Assets/Launch/Config/WebGLRemoteConfig.cs
@@ -92,7 +92,7 @@
        else
            fallbackUrl = mainUrl;
        Debug.Log($"[WebGLRemoteConfig] 模式={CurrentMode}, MainURL={mainUrl}, FallbackURL={fallbackUrl}");
        // Debug.Log($"[WebGLRemoteConfig] 模式={CurrentMode}, MainURL={mainUrl}, FallbackURL={fallbackUrl}");
        return new UrlRemoteServices(mainUrl, fallbackUrl);
    }
}
Assets/Launch/HttpRequest/HttpBehaviour.cs
@@ -104,7 +104,7 @@
                }
                ConnectAllTimes++;
                Debug.LogWarning($"[HttpBehaviour] CreateAsync failed (attempt {attempt + 1}/{_retry + 1}): {message} url={_url}");
                // Debug.LogWarning($"[HttpBehaviour] CreateAsync failed (attempt {attempt + 1}/{_retry + 1}): {message} url={_url}");
            }
            _result?.Invoke(ok, message);
Assets/Launch/Launch.cs
@@ -301,7 +301,7 @@
                elapsed += 0.5f;
                if (elapsed > 30f)
                {
                    Debug.LogWarning("[Launch] UpdateBackground give up: cdnUrl not ready within 30s.");
                    // Debug.LogWarning("[Launch] UpdateBackground give up: cdnUrl not ready within 30s.");
                    TraceEnd("UpdateBackgroundAsync", "启动背景更新", "结果: cdnUrl 超时");
                    return;
                }
@@ -349,7 +349,7 @@
            File.WriteAllBytes(dir + "LoginBackground_" + newVersion + ".jpg", imgReq.downloadHandler.data);
            LocalSave.SetString("bg_version", newVersion);
            Debug.LogWarning($"[Launch] Background updated to version {newVersion}");
            // Debug.LogWarning($"[Launch] Background updated to version {newVersion}");
            TraceEnd("UpdateBackgroundAsync", "启动背景更新", $"结果: 背景更新到 {newVersion}");
#endif
        }
@@ -365,7 +365,7 @@
    async void Start()
    {
        TraceBegin("Start", "冷启动入口");
        Debug.LogWarning("[Launch] Start");
        // Debug.LogWarning("[Launch] Start");
#if UNITY_WEBGL && DOUYINMINIGAME && !UNITY_EDITOR
        TraceBegin("PlatformBootstrap", "平台SDK初始化");
@@ -448,7 +448,7 @@
                : WebGLRemoteConfig.CreateRemoteServices();
            if (!string.IsNullOrEmpty(webCdnUrl))
                remoteCdnBaseUrl = webCdnUrl;
            Debug.LogWarning($"[Launch] WebGL remoteCdnBaseUrl={remoteCdnBaseUrl ?? WebGLRemoteConfig.ActiveServerURL}");
            // Debug.LogWarning($"[Launch] WebGL remoteCdnBaseUrl={remoteCdnBaseUrl ?? WebGLRemoteConfig.ActiveServerURL}");
#else
            // 非 WebGL 正式包:
            // 先读 VersionConfigEx(Resources.Load,不依赖 YooAsset),
@@ -473,14 +473,14 @@
            string fullCdnBaseUrl = string.IsNullOrEmpty(remoteCdnBaseUrl)
                ? null
                : remoteCdnBaseUrl + LocalResManager.fixPath;
            Debug.LogWarning($"[Launch] cdnUrl={fullCdnBaseUrl}, PlayMode={playMode}");
            // Debug.LogWarning($"[Launch] cdnUrl={fullCdnBaseUrl}, PlayMode={playMode}");
            await YooAssetInitializer.Instance.InitializeAsync(playMode, remoteServices, fullCdnBaseUrl);
            if (YooAssetInitializer.Instance.State == YooAssetInitializer.InitState.InitFailed)
            {
                Debug.LogError($"[Launch] YooAsset early init failed: {YooAssetInitializer.Instance.LastError}");
                // Debug.LogError($"[Launch] YooAsset early init failed: {YooAssetInitializer.Instance.LastError}");
                TraceEnd("InitYooAssetEarlyAsync", "资源系统预初始化", "结果: 初始化失败");
                return;
            }
@@ -491,12 +491,12 @@
            // HostPlayMode: 不预下载全部资源。YooAsset CacheFileSystem 在 LoadAssetAsync 时自动按需从 CDN 下载。
            Debug.LogWarning("[Launch] YooAsset early init completed. State: " + YooAssetInitializer.Instance.State);
            // Debug.LogWarning("[Launch] YooAsset early init completed. State: " + YooAssetInitializer.Instance.State);
            TraceEnd("InitYooAssetEarlyAsync", "资源系统预初始化", "结果: 初始化完成");
        }
        catch (Exception ex)
        {
            Debug.LogError($"[Launch] YooAsset early init exception: {ex}");
            // Debug.LogError($"[Launch] YooAsset early init exception: {ex}");
            TraceEnd("InitYooAssetEarlyAsync", "资源系统预初始化", "结果: 异常");
        }
    }
@@ -592,7 +592,7 @@
                continue;
            // 加载assembly对应的dll,会自动为它hook。一旦aot泛型函数的native函数不存在,用解释器版本代码
            LoadImageErrorCode err = RuntimeApi.LoadMetadataForAOTAssembly(ReadBytesFromStreamingAssets(aotDllName), mode);
            Debug.LogWarning($"LoadMetadataForAOTAssembly:{aotDllName}. mode:{mode} ret:{err}");
            // Debug.LogWarning($"LoadMetadataForAOTAssembly:{aotDllName}. mode:{mode} ret:{err}");
        }
        TraceEnd("LoadMetadataForAOTAssemblies", "AOT元数据加载");
    }
@@ -635,7 +635,7 @@
            Debug.LogError("无法找到get_Instance方法");
        }
        LocalResManager.Instance.RecordLauchEvent(3);
        Debug.LogWarning("进入游戏流程");
        // Debug.LogWarning("进入游戏流程");
        TraceEnd("StartGame", "进入热更主流程", "结果: LaunchInHot.Instance 已触发");
    }
@@ -799,7 +799,7 @@
                downloadBytes = downloader != null ? downloader.TotalDownloadBytes : 0;
                needRemote = downloadCount > 0 || downloadBytes > 0;
                downloadStartTime = Time.realtimeSinceStartup;
                Debug.LogWarning($"[YooAssetDownload] Start on-demand source=Launch.ReadDllBytes, package={dllPackage.PackageName}, location='{location}', files={downloadCount}, size={FormatBytes(downloadBytes)}");
                // Debug.LogWarning($"[YooAssetDownload] Start on-demand source=Launch.ReadDllBytes, package={dllPackage.PackageName}, location='{location}', files={downloadCount}, size={FormatBytes(downloadBytes)}");
            }
        }
        catch (Exception ex)
@@ -824,10 +824,10 @@
            if (needRemote)
            {
                float cost = Time.realtimeSinceStartup - downloadStartTime;
                Debug.LogWarning($"[YooAssetDownload] Finish on-demand source=Launch.ReadDllBytes, package={dllPackage.PackageName}, location='{location}', files={downloadCount}, size={FormatBytes(downloadBytes)}, cost={cost:F2}s");
                // Debug.LogWarning($"[YooAssetDownload] Finish on-demand source=Launch.ReadDllBytes, package={dllPackage.PackageName}, location='{location}', files={downloadCount}, size={FormatBytes(downloadBytes)}, cost={cost:F2}s");
            }
            s_assetDatas[dllName] = ((TextAsset)handle.AssetObject).bytes;
            Debug.LogWarning($"[Launch] Loaded DLL: {dllName} size:{s_assetDatas[dllName].Length}");
            // Debug.LogWarning($"[Launch] Loaded DLL: {dllName} size:{s_assetDatas[dllName].Length}");
        }
    }
Assets/Launch/Manager/LocalResManager.cs
@@ -22,7 +22,7 @@
{
    private static void LogTiming(string phase, float startTime)
    {
        Debug.LogWarning($"[LocalResManager][Timing] {phase} cost={(Time.realtimeSinceStartup - startTime):F3}s");
        // Debug.LogWarning($"[LocalResManager][Timing] {phase} cost={(Time.realtimeSinceStartup - startTime):F3}s");
    }
    //不下载时本地安卓测试路径
@@ -89,7 +89,7 @@
        set
        {
            m_step = value;
            Debug.LogWarning("LoadDllStep:" + m_step);
            // Debug.LogWarning("LoadDllStep:" + m_step);
        }
    }
@@ -261,10 +261,10 @@
            context.Bytes = downloader != null ? downloader.TotalDownloadBytes : 0;
            context.Enabled = context.Count > 0 || context.Bytes > 0;
            if (context.Enabled)
            {
                Debug.LogWarning($"[YooAssetDownload] Start on-demand source={source}, package={context.PackageName}, location='{location}', files={context.Count}, size={FormatBytes(context.Bytes)}");
            }
            // if (context.Enabled)
            // {
            //     Debug.LogWarning($"[YooAssetDownload] Start on-demand source={source}, package={context.PackageName}, location='{location}', files={context.Count}, size={FormatBytes(context.Bytes)}");
            // }
        }
        catch (Exception ex)
        {
@@ -276,18 +276,18 @@
    private void EndOnDemandDownloadLog(DownloadLogContext context, bool succeed, string error = null)
    {
        if (!context.Enabled)
            return;
        // if (!context.Enabled)
        //     return;
        float cost = Time.realtimeSinceStartup - context.StartTime;
        if (succeed)
        {
            Debug.LogWarning($"[YooAssetDownload] Finish on-demand source={context.Source}, package={context.PackageName}, location='{context.Location}', files={context.Count}, size={FormatBytes(context.Bytes)}, cost={cost:F2}s");
        }
        else
        {
            Debug.LogError($"[YooAssetDownload] Failed on-demand source={context.Source}, package={context.PackageName}, location='{context.Location}', files={context.Count}, size={FormatBytes(context.Bytes)}, cost={cost:F2}s, error={error}");
        }
        // float cost = Time.realtimeSinceStartup - context.StartTime;
        // if (succeed)
        // {
        //     Debug.LogWarning($"[YooAssetDownload] Finish on-demand source={context.Source}, package={context.PackageName}, location='{context.Location}', files={context.Count}, size={FormatBytes(context.Bytes)}, cost={cost:F2}s");
        // }
        // else
        // {
        //     Debug.LogError($"[YooAssetDownload] Failed on-demand source={context.Source}, package={context.PackageName}, location='{context.Location}', files={context.Count}, size={FormatBytes(context.Bytes)}, cost={cost:F2}s, error={error}");
        // }
    }
    private static string FormatBytes(long bytes)
Assets/Launch/Manager/YooAssetInitializer.cs
@@ -165,7 +165,7 @@
                    }
                    catch (Exception initEx) when (playMode == EPlayMode.HostPlayMode && enableBuildinFileSystem)
                    {
                        Debug.LogWarning($"[YooAssetInitializer] Package '{pkgName}' init with BuildinFileSystem failed, retry cache-only: {initEx.Message}");
                        // Debug.LogWarning($"[YooAssetInitializer] Package '{pkgName}' init with BuildinFileSystem failed, retry cache-only: {initEx.Message}");
                        await RemovePackageSafelyAsync(pkgName, package);
                        package = YooAssets.CreatePackage(pkgName);
@@ -189,7 +189,7 @@
                        _configPackage = package;
                    }
                    Debug.Log($"[YooAssetInitializer] Package '{pkgName}' initialized.");
                    // Debug.Log($"[YooAssetInitializer] Package '{pkgName}' initialized.");
                }
                catch (Exception ex)
                {
@@ -222,8 +222,8 @@
                Debug.LogError($"[YooAssetInitializer] {failedPkgs.Count} package(s) FAILED: [{string.Join(", ", failedPkgs)}]. " +
                    "Check earlier console errors (look for 'CreateInitParameters FAILED' or 'SimulateBuild' errors).");
            }
            Debug.Log($"[YooAssetInitializer] Initialized {successCount}/{names.Length} packages with PlayMode={playMode}. " +
                $"Active: [{string.Join(", ", _packages.Keys)}]");
            // Debug.Log($"[YooAssetInitializer] Initialized {successCount}/{names.Length} packages with PlayMode={playMode}. " +
            //     $"Active: [{string.Join(", ", _packages.Keys)}]");
        }
        catch (Exception ex)
        {
@@ -245,7 +245,7 @@
    {
        if (State != InitState.Initialized)
        {
            Debug.LogWarning($"[YooAssetInitializer] Invalid state for RequestVersionAndUpdate: {State}");
            // Debug.LogWarning($"[YooAssetInitializer] Invalid state for RequestVersionAndUpdate: {State}");
            return;
        }
@@ -263,7 +263,7 @@
            State = InitState.VersionChecked;
            State = InitState.Ready;
            Debug.Log("[YooAssetInitializer] All packages version checked. State → Ready");
            // Debug.Log("[YooAssetInitializer] All packages version checked. State → Ready");
#if UNITY_WEBGL || TEST_BUILD
            foreach (var kvp in _packages)
            {
@@ -296,7 +296,7 @@
            {
                if (versionAttempt > 0)
                {
                    Debug.LogWarning($"[YooAssetInitializer] RequestPackageVersion retry {versionAttempt}/{versionRetryMax} for '{pkgName}'");
                    // Debug.LogWarning($"[YooAssetInitializer] RequestPackageVersion retry {versionAttempt}/{versionRetryMax} for '{pkgName}'");
                    await UniTask.Delay(1000);
                }
                var versionOp = package.RequestPackageVersionAsync();
@@ -312,7 +312,7 @@
            if (versionStatus != EOperationStatus.Succeed)
            {
                Debug.LogWarning($"[YooAssetInitializer] RequestPackageVersion failed for '{pkgName}': {versionOpError}");
                // Debug.LogWarning($"[YooAssetInitializer] RequestPackageVersion failed for '{pkgName}': {versionOpError}");
#if UNITY_WEBGL || TEST_BUILD
                LogPackageState(pkgName, package, "request-version-failed");
#endif
@@ -320,7 +320,7 @@
                // HostPlayMode 远程版本检查失败时,尝试加载内置 manifest(回退到随包资源)
                if (_playMode == EPlayMode.HostPlayMode)
                {
                    Debug.Log($"[YooAssetInitializer] HostPlayMode fallback: loading buildin manifest for '{pkgName}'");
                    // Debug.Log($"[YooAssetInitializer] HostPlayMode fallback: loading buildin manifest for '{pkgName}'");
                    var fallbackVersionOp = package.RequestPackageVersionAsync(true);
                    await fallbackVersionOp.ToUniTask();
                    if (fallbackVersionOp.Status == EOperationStatus.Succeed)
@@ -337,19 +337,19 @@
                            await fallbackClearManifestOp.ToUniTask();
#endif
                            Debug.Log($"[YooAssetInitializer] Package '{pkgName}' using buildin manifest v{fallbackVersionOp.PackageVersion}");
                            // Debug.Log($"[YooAssetInitializer] Package '{pkgName}' using buildin manifest v{fallbackVersionOp.PackageVersion}");
#if UNITY_WEBGL || TEST_BUILD
                            LogPackageState(pkgName, package, "fallback-manifest-success");
#endif
                            return;
                        }
                    }
                    Debug.LogWarning($"[YooAssetInitializer] Buildin manifest fallback also failed for '{pkgName}'");
                    // Debug.LogWarning($"[YooAssetInitializer] Buildin manifest fallback also failed for '{pkgName}'");
                }
                return;
            }
            Debug.Log($"[YooAssetInitializer] Package '{pkgName}' version: {packageVersion}");
            // Debug.Log($"[YooAssetInitializer] Package '{pkgName}' version: {packageVersion}");
            // 2. 更新 Manifest
            var manifestOp = package.UpdatePackageManifestAsync(packageVersion);
@@ -357,7 +357,7 @@
            if (manifestOp.Status != EOperationStatus.Succeed)
            {
                Debug.LogWarning($"[YooAssetInitializer] UpdatePackageManifest failed for '{pkgName}': {manifestOp.Error}");
                // Debug.LogWarning($"[YooAssetInitializer] UpdatePackageManifest failed for '{pkgName}': {manifestOp.Error}");
#if UNITY_WEBGL || TEST_BUILD
                LogPackageState(pkgName, package, "update-manifest-failed");
#endif
@@ -372,7 +372,7 @@
            await clearManifestOp.ToUniTask();
#endif
            Debug.Log($"[YooAssetInitializer] Package '{pkgName}' manifest updated to {packageVersion}.");
            // Debug.Log($"[YooAssetInitializer] Package '{pkgName}' manifest updated to {packageVersion}.");
#if UNITY_WEBGL || TEST_BUILD
            LogPackageState(pkgName, package, "update-manifest-success");
#endif
@@ -475,18 +475,18 @@
    {
        if (downloader == null)
        {
            Debug.LogWarning("[YooAssetInitializer] Downloader is null.");
            // Debug.LogWarning("[YooAssetInitializer] Downloader is null.");
            return;
        }
        if (downloader.TotalDownloadCount == 0)
        {
            Debug.Log("[YooAssetInitializer] No resources need to download.");
            // Debug.Log("[YooAssetInitializer] No resources need to download.");
            progress?.Report(1f);
            return;
        }
        BindDownloadLogCallbacks(downloader, "Launch.DownloadAsync");
        // BindDownloadLogCallbacks(downloader, "Launch.DownloadAsync");
        float startTime = Time.realtimeSinceStartup;
        float lastLogTime = 0f;
@@ -496,7 +496,7 @@
        while (!downloader.IsDone)
        {
            progress?.Report(downloader.Progress);
            LogDownloaderProgress(downloader, "Launch.DownloadAsync", startTime, ref lastLogTime, ref lastLogPercent);
            // LogDownloaderProgress(downloader, "Launch.DownloadAsync", startTime, ref lastLogTime, ref lastLogPercent);
            await UniTask.Yield();
        }
@@ -507,7 +507,7 @@
        }
        progress?.Report(1f);
        Debug.Log("[YooAssetInitializer] Download completed.");
        // Debug.Log("[YooAssetInitializer] Download completed.");
    }
    /// <summary>
@@ -527,7 +527,7 @@
        if (State < InitState.Ready)
        {
            Debug.LogWarning($"[YooAssetInitializer] Cannot download in state: {State}");
            // Debug.LogWarning($"[YooAssetInitializer] Cannot download in state: {State}");
            progress?.Report(1f);
            return;
        }
@@ -550,12 +550,12 @@
        if (totalCount == 0)
        {
            Debug.Log("[YooAssetInitializer] All resources are up-to-date, no download needed.");
            // Debug.Log("[YooAssetInitializer] All resources are up-to-date, no download needed.");
            progress?.Report(1f);
            return;
        }
        Debug.Log($"[YooAssetInitializer] Need to download {totalCount} files ({totalBytes / 1024f / 1024f:F2} MB) across {downloaders.Count} packages");
        // Debug.Log($"[YooAssetInitializer] Need to download {totalCount} files ({totalBytes / 1024f / 1024f:F2} MB) across {downloaders.Count} packages");
        // 2. 逐包下载,汇总进度
        long downloadedBytes = 0;
@@ -565,9 +565,9 @@
            var downloader = downloaders[i].Value;
            long pkgBytes = downloader.TotalDownloadBytes;
            Debug.Log($"[YooAssetInitializer] Downloading package '{pkgName}': {downloader.TotalDownloadCount} files, {pkgBytes / 1024f / 1024f:F2} MB");
            string source = $"Launch.DownloadAllPending package='{pkgName}'";
            BindDownloadLogCallbacks(downloader, source);
            // Debug.Log($"[YooAssetInitializer] Downloading package '{pkgName}': {downloader.TotalDownloadCount} files, {pkgBytes / 1024f / 1024f:F2} MB");
            // string source = $"Launch.DownloadAllPending package='{pkgName}'";
            // BindDownloadLogCallbacks(downloader, source);
            float startTime = Time.realtimeSinceStartup;
            float lastLogTime = 0f;
@@ -581,51 +581,51 @@
                    ? (downloadedBytes + (long)(pkgBytes * currentPkgProgress)) / (float)totalBytes
                    : 0f;
                progress?.Report(overallProgress);
                LogDownloaderProgress(downloader, source, startTime, ref lastLogTime, ref lastLogPercent, overallProgress);
                // LogDownloaderProgress(downloader, source, startTime, ref lastLogTime, ref lastLogPercent, overallProgress);
                await UniTask.Yield();
            }
            if (downloader.Status != EOperationStatus.Succeed)
            {
                Debug.LogError($"[YooAssetInitializer] Package '{pkgName}' download failed: {downloader.Error}");
                // 继续下载其他包,不中断
            }
            else
            {
                Debug.Log($"[YooAssetInitializer] Package '{pkgName}' download completed.");
            }
            // if (downloader.Status != EOperationStatus.Succeed)
            // {
            //     Debug.LogError($"[YooAssetInitializer] Package '{pkgName}' download failed: {downloader.Error}");
            //     // 继续下载其他包,不中断
            // }
            // else
            // {
            //     // Debug.Log($"[YooAssetInitializer] Package '{pkgName}' download completed.");
            // }
            downloadedBytes += pkgBytes;
        }
        progress?.Report(1f);
        Debug.Log($"[YooAssetInitializer] All pending downloads finished. {downloaders.Count} packages processed.");
        // Debug.Log($"[YooAssetInitializer] All pending downloads finished. {downloaders.Count} packages processed.");
    }
    private static void BindDownloadLogCallbacks(ResourceDownloaderOperation downloader, string source)
    {
        if (downloader == null)
            return;
    // private static void BindDownloadLogCallbacks(ResourceDownloaderOperation downloader, string source)
    // {
    //     if (downloader == null)
    //         return;
        float startTime = Time.realtimeSinceStartup;
        Debug.Log($"[YooAssetDownload] Start downloader source={source}, files={downloader.TotalDownloadCount}, size={FormatBytes(downloader.TotalDownloadBytes)}");
    //     float startTime = Time.realtimeSinceStartup;
    //     Debug.Log($"[YooAssetDownload] Start downloader source={source}, files={downloader.TotalDownloadCount}, size={FormatBytes(downloader.TotalDownloadBytes)}");
        downloader.DownloadFileBeginCallback = data =>
        {
            Debug.Log($"[YooAssetDownload] File begin source={source}, package={data.PackageName}, file='{data.FileName}', size={FormatBytes(data.FileSize)}");
        };
        downloader.DownloadErrorCallback = data =>
        {
            float cost = Time.realtimeSinceStartup - startTime;
            Debug.LogError($"[YooAssetDownload] File error source={source}, package={data.PackageName}, file='{data.FileName}', cost={cost:F2}s, error={data.ErrorInfo}");
        };
        downloader.DownloadFinishCallback = data =>
        {
            float cost = Time.realtimeSinceStartup - startTime;
            string result = data.Succeed ? "Finish" : "Failed";
            Debug.Log($"[YooAssetDownload] {result} downloader source={source}, package={data.PackageName}, files={downloader.CurrentDownloadCount}/{downloader.TotalDownloadCount}, size={FormatBytes(downloader.CurrentDownloadBytes)}/{FormatBytes(downloader.TotalDownloadBytes)}, cost={cost:F2}s");
        };
    }
    //     downloader.DownloadFileBeginCallback = data =>
    //     {
    //         Debug.Log($"[YooAssetDownload] File begin source={source}, package={data.PackageName}, file='{data.FileName}', size={FormatBytes(data.FileSize)}");
    //     };
    //     downloader.DownloadErrorCallback = data =>
    //     {
    //         float cost = Time.realtimeSinceStartup - startTime;
    //         Debug.LogError($"[YooAssetDownload] File error source={source}, package={data.PackageName}, file='{data.FileName}', cost={cost:F2}s, error={data.ErrorInfo}");
    //     };
    //     downloader.DownloadFinishCallback = data =>
    //     {
    //         float cost = Time.realtimeSinceStartup - startTime;
    //         string result = data.Succeed ? "Finish" : "Failed";
    //         Debug.Log($"[YooAssetDownload] {result} downloader source={source}, package={data.PackageName}, files={downloader.CurrentDownloadCount}/{downloader.TotalDownloadCount}, size={FormatBytes(downloader.CurrentDownloadBytes)}/{FormatBytes(downloader.TotalDownloadBytes)}, cost={cost:F2}s");
    //     };
    // }
    private static void LogDownloaderProgress(ResourceDownloaderOperation downloader, string source, float startTime,
        ref float lastLogTime, ref int lastLogPercent, float overallProgress = -1f)
@@ -642,7 +642,7 @@
        lastLogPercent = percent;
        string overall = overallProgress >= 0f ? $", overall={Mathf.Clamp01(overallProgress) * 100f:F1}%" : string.Empty;
        Debug.Log($"[YooAssetDownload] Progress source={source}, progress={percent}%, files={downloader.CurrentDownloadCount}/{downloader.TotalDownloadCount}, size={FormatBytes(downloader.CurrentDownloadBytes)}/{FormatBytes(downloader.TotalDownloadBytes)}, cost={now - startTime:F2}s{overall}");
        // Debug.Log($"[YooAssetDownload] Progress source={source}, progress={percent}%, files={downloader.CurrentDownloadCount}/{downloader.TotalDownloadCount}, size={FormatBytes(downloader.CurrentDownloadBytes)}/{FormatBytes(downloader.TotalDownloadBytes)}, cost={now - startTime:F2}s{overall}");
    }
    private static string FormatBytes(long bytes)
@@ -714,10 +714,10 @@
        if (playMode == EPlayMode.HostPlayMode)
        {
            enableBuildinFileSystem = await HasBuildinCatalogAsync(packageName);
            if (enableBuildinFileSystem)
                Debug.Log($"[{logPrefix}] Package '{packageName}' has buildin catalog, enable BuildinFileSystem.");
            else
                Debug.Log($"[{logPrefix}] Package '{packageName}' has no buildin catalog, skip BuildinFileSystem.");
            // if (enableBuildinFileSystem)
            //     Debug.Log($"[{logPrefix}] Package '{packageName}' has buildin catalog, enable BuildinFileSystem.");
            // else
            //     Debug.Log($"[{logPrefix}] Package '{packageName}' has no buildin catalog, skip BuildinFileSystem.");
        }
        return enableBuildinFileSystem;
Assets/Launch/SDK/XingwanTTSDK.cs
@@ -239,10 +239,10 @@
        if (!hasResult)
            result = SettleInit(Fail("星玩初始化超时", -5));
        if (!result.Ok)
            Debug.LogError($"[Xingwan] 初始化失败: {result}");
        else
            Debug.Log($"[Xingwan] 初始化成功: {result.Status}");
        // if (!result.Ok)
        //     Debug.LogError($"[Xingwan] 初始化失败: {result}");
        // else
        //     Debug.Log($"[Xingwan] 初始化成功: {result.Status}");
        return result;
    }
@@ -294,10 +294,10 @@
            result = Fail("星玩登录超时", -5);
        var login = ToLoginResult(result);
        if (!login.Ok)
            Debug.LogError($"[Xingwan] 登录失败: {login}");
        else
            Debug.Log($"[Xingwan] 登录成功 userId={login.UserId}, token长度={login.Token?.Length ?? 0}");
        // if (!login.Ok)
        //     Debug.LogError($"[Xingwan] 登录失败: {login}");
        // else
        //     Debug.Log($"[Xingwan] 登录成功 userId={login.UserId}, token长度={login.Token?.Length ?? 0}");
        return login;
    }
@@ -341,7 +341,7 @@
        var result = await s_payTcs.Task;
        s_payTcs = null;
        Debug.Log($"[Xingwan] 支付返回: {result}, order={p.DeveloperOrder}, money={p.MoneyFen}分");
        // Debug.Log($"[Xingwan] 支付返回: {result}, order={p.DeveloperOrder}, money={p.MoneyFen}分");
        return result;
    }
@@ -377,10 +377,10 @@
        if (!hasResult)
            result = Fail("syncData 超时", -5);
        if (!result.Ok)
            Debug.LogWarning($"[Xingwan] 角色数据同步失败 type={type}: {result}");
        else
            Debug.Log($"[Xingwan] 角色数据同步成功 type={type}");
        // if (!result.Ok)
        //     Debug.LogWarning($"[Xingwan] 角色数据同步失败 type={type}: {result}");
        // else
        //     Debug.Log($"[Xingwan] 角色数据同步成功 type={type}");
        return result;
    }
Assets/Launch/UI/LaunchWins/LaunchExWin.cs
@@ -56,13 +56,13 @@
    private static void LogTiming(string phase, float startTime)
    {
#if UNITY_WEBGL
        Debug.Log("[LaunchExWin][Timing] " + phase + " cost=" +
                  (Time.realtimeSinceStartup - startTime).ToString("F3") + "s");
#else
        Debug.LogWarning("[LaunchExWin][Timing] " + phase + " cost=" +
                         (Time.realtimeSinceStartup - startTime).ToString("F3") + "s");
#endif
// #if UNITY_WEBGL
//         Debug.Log("[LaunchExWin][Timing] " + phase + " cost=" +
//                   (Time.realtimeSinceStartup - startTime).ToString("F3") + "s");
// #else
//         Debug.LogWarning("[LaunchExWin][Timing] " + phase + " cost=" +
//                          (Time.realtimeSinceStartup - startTime).ToString("F3") + "s");
// #endif
    }
    void Awake()
Assets/Launch/Utility/LaunchUtility.cs
@@ -130,18 +130,18 @@
            if (versionAsset != null)
            {
                string versionText = versionAsset.text.Trim();
                Debug.Log($"从Resources加载版本信息: {versionText}");
                // Debug.Log($"从Resources加载版本信息: {versionText}");
                return versionText;
            }
            
            // 如果Resources中没有版本文件,则使用应用程序版本
            string appVersion = Application.version;
            Debug.Log($"使用应用程序版本: {appVersion}");
            // Debug.Log($"使用应用程序版本: {appVersion}");
            
            // 确保版本号格式正确
            if (string.IsNullOrEmpty(appVersion))
            {
                Debug.LogWarning("应用程序版本为空,使用默认版本 1.0.0");
                // Debug.LogWarning("应用程序版本为空,使用默认版本 1.0.0");
                appVersion = "1.0.0";
            }
            
@@ -182,12 +182,12 @@
                        if (request.result == UnityWebRequest.Result.Success)
                        {
                            string versionText = request.downloadHandler.text.Trim();
                            Debug.Log($"成功获取远程版本: {versionText},尝试次数: {retry + 1}");
                            // Debug.Log($"成功获取远程版本: {versionText},尝试次数: {retry + 1}");
                            return versionText;
                        }
                        else
                        {
                            Debug.LogWarning($"获取远程版本失败: {request.error},尝试次数: {retry + 1}/{maxRetries}");
                            // Debug.LogWarning($"获取远程版本失败: {request.error},尝试次数: {retry + 1}/{maxRetries}");
                        }
                    }
                }
@@ -245,11 +245,11 @@
        {
            // 获取本地版本
            string localVersion = await GetLocalVersionAsync();
            Debug.Log($"本地版本: {localVersion}");
            // Debug.Log($"本地版本: {localVersion}");
            
            // 获取远程版本
            string remoteVersion = await GetRemoteVersionAsync(versionUrl);
            Debug.Log($"远程版本: {remoteVersion}");
            // Debug.Log($"远程版本: {remoteVersion}");
            
            // 比较版本
            UpdateType updateType = CompareVersions(localVersion, remoteVersion);
Assets/Plugins/NativeWebSocket/Assets/WebSocket/WebSocket.cs
@@ -469,12 +469,12 @@
                }
                await m_Socket.ConnectAsync(uri, m_CancellationToken);
                Debug.Log($"[NativeWebSocket] ConnectAsync 完成, Socket.State = {m_Socket.State}");
                // Debug.Log($"[NativeWebSocket] ConnectAsync 完成, Socket.State = {m_Socket.State}");
                OnOpen?.Invoke();
                Debug.Log("[NativeWebSocket] 开始进入 Receive 循环...");
                // Debug.Log("[NativeWebSocket] 开始进入 Receive 循环...");
                await Receive();
                Debug.Log("[NativeWebSocket] Receive 循环已返回");
                // Debug.Log("[NativeWebSocket] Receive 循环已返回");
            }
            catch (Exception ex)
            {
@@ -647,7 +647,7 @@
            WebSocketCloseCode closeCode = WebSocketCloseCode.Abnormal;
            await new WaitForBackgroundThread();
            Debug.Log($"[NativeWebSocket] Receive 循环开始, Socket.State = {m_Socket.State}");
            // Debug.Log($"[NativeWebSocket] Receive 循环开始, Socket.State = {m_Socket.State}");
            int messageCount = 0;
            ArraySegment<byte> buffer = new ArraySegment<byte>(new byte[8192]);
@@ -671,7 +671,7 @@
                        if (result.MessageType == WebSocketMessageType.Text)
                        {
                            messageCount++;
                            Debug.Log($"[NativeWebSocket] 📩 收到文本消息 #{messageCount}, 大小: {ms.Length} bytes");
                            // Debug.Log($"[NativeWebSocket] 📩 收到文本消息 #{messageCount}, 大小: {ms.Length} bytes");
                            lock (IncomingMessageLock)
                            {
                              m_MessageList.Add(ms.ToArray());
@@ -686,7 +686,7 @@
                        else if (result.MessageType == WebSocketMessageType.Binary)
                        {
                            messageCount++;
                            Debug.Log($"[NativeWebSocket] 📩 收到二进制消息 #{messageCount}, 大小: {ms.Length} bytes");
                            // Debug.Log($"[NativeWebSocket] 📩 收到二进制消息 #{messageCount}, 大小: {ms.Length} bytes");
                            lock (IncomingMessageLock)
                            {
                              m_MessageList.Add(ms.ToArray());