三国卡牌客户端基础资源仓库
yyl
3 天以前 807931717a12d18bd622f3917d16835cc016ec6a
update
2个文件已修改
71 ■■■■■ 已修改文件
Assets/Launch/Launch.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Manager/LocalResManager.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Launch.cs
@@ -129,6 +129,13 @@
        }
#else
        Debug.unityLogger.logEnabled = true;
        // HybridCLR AOT 桥接:显式引用 ILogger.set_filterLogType,避免被 IL2CPP 裁剪,
        // 否则热更 InitSettingTask 里 Debug.unityLogger.filterLogType 会报 MissingMethodException。
        Debug.unityLogger.filterLogType = LogType.Log;
#endif
#if UNITY_EDITOR
        Application.runInBackground = true;
#endif
        OpenLaunchStaticWin().Forget();
@@ -288,6 +295,15 @@
    {
        TraceBegin("Start", "冷启动入口");
        Debug.LogWarning("[Launch] Start");
#if UNITY_WEBGL && DOUYINMINIGAME && !UNITY_EDITOR
        // 抖音小游戏:TTSDK 容器必须最先初始化。
        // YooAsset 的 TiktokFileSystem 依赖容器就绪,晚于 YooAsset 初始化会导致资源读写失败。
        TraceBegin("PlatformBootstrap", "平台SDK初始化");
        bool sdkReady = await PlatformBootstrap.InitAsync();
        TraceEnd("PlatformBootstrap", "平台SDK初始化", $"结果: SDK={(sdkReady ? "就绪" : "未启用/失败")}");
#endif
#if UNITY_WEBGL
            await VersionConfigEx.Get();
#else
@@ -380,8 +396,14 @@
            }
#endif
            Debug.LogWarning($"[Launch] cdnUrl={remoteCdnBaseUrl+ LocalResManager.fixPath}, PlayMode={playMode}");
            await YooAssetInitializer.Instance.InitializeAsync(playMode, remoteServices, remoteCdnBaseUrl + LocalResManager.fixPath);
            string fixPath = (VersionConfigEx.config != null && VersionConfigEx.config.enableLanguagePackage)
                ? LocalResManager.fixPath
                : "";
            string fullCdnBaseUrl = string.IsNullOrEmpty(remoteCdnBaseUrl)
                ? null
                : remoteCdnBaseUrl + fixPath;
            Debug.LogWarning($"[Launch] cdnUrl={fullCdnBaseUrl}, PlayMode={playMode}");
            await YooAssetInitializer.Instance.InitializeAsync(playMode, remoteServices, fullCdnBaseUrl);
@@ -416,7 +438,9 @@
        System.Globalization.CultureInfo.CurrentUICulture = culture;
        System.Globalization.CultureInfo.DefaultThreadCurrentCulture = culture;
        System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = culture;
#if !UNITY_WEBGL
        System.Net.ServicePointManager.DefaultConnectionLimit = 100;
#endif
        StringUtility.WarmupPool();
        SDKInit();
@@ -626,6 +650,8 @@
        "UnityEngine.JSONSerializeModule.dll.bytes",
        "UnityEngine.UI.dll.bytes",
        "YooAsset.dll.bytes",
        // 抖音小游戏文件系统:TiktokFileSystem 泛型方法需补AOT元数据(与 AOT_DLL_NAMES 一致)
        "YooAsset.MiniGame.dll.bytes",
        "mscorlib.dll.bytes",
        "spine-csharp.dll.bytes",
    };
Assets/Launch/Manager/LocalResManager.cs
@@ -148,34 +148,34 @@
            case "ryzj":
                VERSION_URL = new string[]
                {
                    "https://xssgcenter.secondworld.net.cn:11000/center/appversion_new.php?",
                    "https://106.55.151.92:11000/center/appversion_new.php?",
                    "http://xssgcenter.secondworld.net.cn:11000/center/appversion_new.php?",
                    "http://106.55.151.92:11000/center/appversion_new.php?",
                };
                break;
            case "sghy":
                VERSION_URL = new string[]
                {
                    "https://sghycenter.funimpactgames.com:11000/center/appversion_new.php?",
                    "https://47.250.213.171:11000/center/appversion_new.php?",
                    "http://sghycenter.funimpactgames.com:11000/center/appversion_new.php?",
                    "http://47.250.213.171:11000/center/appversion_new.php?",
                };
                break;
            case "xssgyh":
                VERSION_URL = new string[]
                {
                    "https://xssgyhcenter.secondworld.net.cn:11000/center/appversion_new.php/?",
                    "http://xssgyhcenter.secondworld.net.cn:11000/center/appversion_new.php/?",
                };
                break;
            case "xssgdy":
                VERSION_URL = new string[]
                {
                    "https://xssgdycenter.secondworld.net.cn:11000/center/appversion_new.php/?",
                    "http://xssgdycenter.secondworld.net.cn:11000/center/appversion_new.php/?",
                };
                break;
            default:
                VERSION_URL = new string[]
                {
                    "https://xssgcenter.secondworld.net.cn:11000/center/appversion_new.php?",
                    "https://106.55.151.92:11000/center/appversion_new.php?",
                    "http://xssgcenter.secondworld.net.cn:11000/center/appversion_new.php?",
                    "http://106.55.151.92:11000/center/appversion_new.php?",
                };
                break;
        }
@@ -185,7 +185,7 @@
        {
            VERSION_URL = new string[]
            { 
                "https://gamecenter.secondworld.net.cn/center/appversion_new.php?",
                "http://gamecenter.secondworld.net.cn/center/appversion_new.php?",
            };
        }
#endif
@@ -911,23 +911,23 @@
            case "test":
            case "xssg":
            case "ryzj":
                url = "https://xssgcenter.secondworld.net.cn:11000/center/eventreport.php?";
                url = "http://xssgcenter.secondworld.net.cn/center/eventreport.php?";
                break;
            case "sghy":
                url = "https://sghycenter.funimpactgames.com:11000/center/eventreport.php?";
                url = "http://sghycenter.funimpactgames.com/center/eventreport.php?";
                break;
            case "xssgyh":
                url = "https://xssgyhcenter.secondworld.net.cn:11000/center/eventreport.php?";
                url = "http://xssgyhcenter.secondworld.net.cn/center/eventreport.php?";
                break;
            case "xssgdy":
                url = "https://xssgdycenter.secondworld.net.cn:11000/center/eventreport.php?";
                url = "http://xssgdycenter.secondworld.net.cn/center/eventreport.php?";
                break;
            default:
                url = "https://xssgcenter.secondworld.net.cn:11000/center/eventreport.php?";
                url = "http://xssgcenter.secondworld.net.cn/center/eventreport.php?";
                break;
        }
#if TEST_URL
        url = "https://gamecenter.secondworld.net.cn:11000/center/eventreport.php?";
        url = "http://gamecenter.secondworld.net.cn/center/eventreport.php?";
#endif
    }
@@ -1004,21 +1004,14 @@
    {
#if UNITY_IOS
        return UnityEngine.iOS.Device.advertisingIdentifier;
#elif UNITY_WEBGL
#elif UNITY_WEBGL && !UNITY_EDITOR
        return GetWebGLDeviceId();
#else
        return UnityEngine.SystemInfo.deviceUniqueIdentifier;
#endif
    }
    public static string GetWebGLDeviceId()
    {
#if UNITY_WEBGL && !UNITY_EDITOR
        return GetOrCreateWebGLDeviceId();
#else
        return UnityEngine.SystemInfo.deviceUniqueIdentifier;
#endif
    }
    public static string GetDeviceOSLevel()
    {