三国卡牌客户端基础资源仓库
yyl
2026-08-28 069050d24a130e28d111cdf966b8d9c9bd27ee10
merge2
1个文件已修改
87 ■■■■■ 已修改文件
Assets/Launch/Manager/LocalResManager.cs 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Launch/Manager/LocalResManager.cs
@@ -148,32 +148,44 @@
            case "ryzj":
                VERSION_URL = new string[]
                {
                    "http://xssgcenter.secondworld.net.cn:11000/center/appversion_new.php?",
                    "http://106.55.151.92:11000/center/appversion_new.php?",
                    "https://xssgcenter.secondworld.net.cn:11000/center/appversion_new.php?",
                    "https://106.55.151.92:11000/center/appversion_new.php?",
                };
                break;
            case "sghy":
                VERSION_URL = new string[]
                {
                    "http://sghycenter.funimpactgames.com:11000/center/appversion_new.php?",
                    "http://47.250.213.171:11000/center/appversion_new.php?",
                    "https://sghycenter.funimpactgames.com:11000/center/appversion_new.php?",
                    "https://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/?",
                };
                break;
            case "xssgdy":
                VERSION_URL = new string[]
                {
                    "https://xssgdycenter.secondworld.net.cn:11000/center/appversion_new.php/?",
                };
                break;
            default:
                VERSION_URL = new string[]
                {
                    "http://xssgcenter.secondworld.net.cn:11000/center/appversion_new.php?",
                    "http://106.55.151.92:11000/center/appversion_new.php?",
                    "https://xssgcenter.secondworld.net.cn:11000/center/appversion_new.php?",
                    "https://106.55.151.92:11000/center/appversion_new.php?",
                };
                break;
        }
#if TEST_URL
#if TEST_URL
        // if (VersionConfigEx.config.versionAuthority == VersionConfigEx.VersionAuthority.InterTest)
        {
            VERSION_URL = new string[]
            {
                "http://gamecenter.secondworld.net.cn:11000/center/appversion_new.php?",
            {
                "https://gamecenter.secondworld.net.cn/center/appversion_new.php?",
            };
        }
#endif
@@ -899,17 +911,23 @@
            case "test":
            case "xssg":
            case "ryzj":
                url = "http://xssgcenter.secondworld.net.cn:11000/center/eventreport.php?";
                url = "https://xssgcenter.secondworld.net.cn:11000/center/eventreport.php?";
                break;
            case "sghy":
                url = "http://sghycenter.funimpactgames.com:11000/center/eventreport.php?";
                url = "https://sghycenter.funimpactgames.com:11000/center/eventreport.php?";
                break;
            case "xssgyh":
                url = "https://xssgyhcenter.secondworld.net.cn:11000/center/eventreport.php?";
                break;
            case "xssgdy":
                url = "https://xssgdycenter.secondworld.net.cn:11000/center/eventreport.php?";
                break;
            default:
                url = "http://xssgcenter.secondworld.net.cn:11000/center/eventreport.php?";
                url = "https://xssgcenter.secondworld.net.cn:11000/center/eventreport.php?";
                break;
        }
#if TEST_URL
        url = "http://gamecenter.secondworld.net.cn:11000/center/eventreport.php?";
        url = "https://gamecenter.secondworld.net.cn:11000/center/eventreport.php?";
#endif
    }
@@ -948,6 +966,21 @@
    }
#if UNITY_WEBGL && !UNITY_EDITOR
    // WebGL 无设备级唯一标识,首次生成随机 GUID 并持久化到浏览器 localStorage(PlayerPrefs 底层),
    // 之后直接复用,保证同一浏览器同一域名下统计去重稳定;清缓存/无痕/换浏览器会重新生成。
    public const string WebGLDeviceIdPrefKey = "webgl_device_unique_id";
    private static string GetOrCreateWebGLDeviceId()
    {
        var id = PlayerPrefs.GetString(WebGLDeviceIdPrefKey, string.Empty);
        if (string.IsNullOrEmpty(id))
        {
            id = System.Guid.NewGuid().ToString("D");
            PlayerPrefs.SetString(WebGLDeviceIdPrefKey, id);
            PlayerPrefs.Save();
        }
        return id;
    }
    private async UniTaskVoid SendLauchEventAsync(int _step)
    {
        var versionConfig = await VersionConfigEx.Get();
@@ -967,12 +1000,23 @@
    }
#endif
    public static string GetDeviceModel()
public static string GetDeviceUniquenessIdentify()
    {
#if UNITY_IOS
        return UnityEngine.iOS.Device.generation.ToString();
        return UnityEngine.iOS.Device.advertisingIdentifier;
#elif UNITY_WEBGL
        return GetWebGLDeviceId();
#else
        return SystemInfo.deviceModel;
        return UnityEngine.SystemInfo.deviceUniqueIdentifier;
#endif
    }
    public static string GetWebGLDeviceId()
    {
#if UNITY_WEBGL && !UNITY_EDITOR
        return GetOrCreateWebGLDeviceId();
#else
        return UnityEngine.SystemInfo.deviceUniqueIdentifier;
#endif
    }
@@ -981,16 +1025,19 @@
#if UNITY_IOS
        return UnityEngine.iOS.Device.systemVersion;
#else
        return SystemInfo.operatingSystem;
        // WebGL 上返回浏览器 User-Agent 中解析出的操作系统信息(如 "Windows NT 10.0; Win64; x64")
        return UnityEngine.SystemInfo.operatingSystem;
#endif
    }
    public static string GetDeviceUniquenessIdentify()
    public static string GetDeviceModel()
    {
#if UNITY_IOS
        return UnityEngine.iOS.Device.advertisingIdentifier;
        return UnityEngine.iOS.Device.generation.ToString();
#else
        return SystemInfo.deviceUniqueIdentifier;
        // WebGL 上返回浏览器名称及版本(如 "Chrome 120.0.0.0"),并非真实硬件型号
        return UnityEngine.SystemInfo.deviceModel;
#endif
    }
    #endregion