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