From 4cd2e5ff198fc731304ebf7cca2110b200385f3e Mon Sep 17 00:00:00 2001 From: huyufei Date: Sat, 11 May 2024 11:34:51 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=8D=87=E7=BA=A7=20CDN=20Host=20?= =?UTF-8?q?=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/GuruManager/Manager/GuruSDKManager.cs | 13 ++++++++++++- Runtime/Code/Config/GuruServicesConfig.cs | 6 ++++-- Runtime/Code/SDK/GuruSDK.Analytics.cs | 4 ++-- Runtime/Code/SDK/GuruSDK.Properties.cs | 2 +- Runtime/Code/SDK/GuruSDK.cs | 3 ++- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Editor/GuruManager/Manager/GuruSDKManager.cs b/Editor/GuruManager/Manager/GuruSDKManager.cs index 4703ce5..f4d4f76 100644 --- a/Editor/GuruManager/Manager/GuruSDKManager.cs +++ b/Editor/GuruManager/Manager/GuruSDKManager.cs @@ -587,6 +587,9 @@ namespace Guru.Editor // BundleID p = n.serializedObject.FindProperty("IPMSetting.bundleId"); p.stringValue = _serviceConfig.app_settings.bundle_id; + // CdnHost + p = n.serializedObject.FindProperty("IPMSetting.cdnHost"); + p.stringValue = _serviceConfig.CdnHost(); // tokenValidTime if (_serviceConfig.TokenValidTime() > 0) { @@ -603,7 +606,15 @@ namespace Guru.Editor p.stringValue = _serviceConfig.fb_settings.fb_client_token; } } - + + n = so.FindProperty("AnalyticsSetting"); + if (null != n) + { + // levelEndSuccessNum + p = n.serializedObject.FindProperty("AnalyticsSetting.levelEndSuccessNum"); + p.intValue = _serviceConfig.LevelEndSuccessNum(); + } + //---------- AMAZON ----------------------- n = so.FindProperty("AmazonSetting"); if (null != n) diff --git a/Runtime/Code/Config/GuruServicesConfig.cs b/Runtime/Code/Config/GuruServicesConfig.cs index b086eb3..dfaca95 100644 --- a/Runtime/Code/Config/GuruServicesConfig.cs +++ b/Runtime/Code/Config/GuruServicesConfig.cs @@ -63,9 +63,10 @@ namespace Guru public bool KeywordsEnabled() => parameters?.enable_keywords ?? false; public int TokenValidTime() => parameters?.token_vaild_time ?? 604800; public int LevelEndSuccessNum() => parameters?.level_end_success_num ?? 50; + public string CdnHost() => parameters?.cdn_host ?? ""; //-------------------------------- Parameters -------------------------------- - - + + } [Serializable] @@ -99,6 +100,7 @@ namespace Guru public bool apple_review = false; // 苹果审核标志位 public bool enable_errorlog = false; public bool ads_compliance = false; + public string cdn_host = ""; } [Serializable] diff --git a/Runtime/Code/SDK/GuruSDK.Analytics.cs b/Runtime/Code/SDK/GuruSDK.Analytics.cs index a92bb77..fbd4f73 100644 --- a/Runtime/Code/SDK/GuruSDK.Analytics.cs +++ b/Runtime/Code/SDK/GuruSDK.Analytics.cs @@ -299,9 +299,9 @@ namespace Guru { Analytics.Track(Consts.EventSDKInfo, new Dictionary() { - { Consts.PropertyFirstOpenTime, time.ToString("F6") }, + { "boost_time", time.ToString("F6") }, { Consts.PropertyDeviceID, DeviceId }, - { Consts.ParameterItemName, Version} + { "version", Version} }, new Analytics.EventSetting() { EnableFirebaseAnalytics = true, diff --git a/Runtime/Code/SDK/GuruSDK.Properties.cs b/Runtime/Code/SDK/GuruSDK.Properties.cs index ec7c94d..f0d9ee4 100644 --- a/Runtime/Code/SDK/GuruSDK.Properties.cs +++ b/Runtime/Code/SDK/GuruSDK.Properties.cs @@ -41,7 +41,7 @@ namespace Guru public static string IDFA => IPMConfig.ADJUST_IDFA; public static string AdjustId => IPMConfig.ADJUST_ID; public static string GSADID => IPMConfig.ADJUST_ADID; - + public static string CdnHost => _appServicesConfig?.CdnHost() ?? ""; private static GuruAppVersion _appVersion; private static GuruAppVersion GuruAppVersion diff --git a/Runtime/Code/SDK/GuruSDK.cs b/Runtime/Code/SDK/GuruSDK.cs index 56a47ad..a77a38d 100644 --- a/Runtime/Code/SDK/GuruSDK.cs +++ b/Runtime/Code/SDK/GuruSDK.cs @@ -328,7 +328,8 @@ namespace Guru _appServicesConfig.app_settings.privacy_url, _appServicesConfig.app_settings.terms_url, _appServicesConfig.app_settings.android_store, - _appServicesConfig.app_settings.ios_store); + _appServicesConfig.app_settings.ios_store, + _appServicesConfig.parameters.cdn_host ?? ""); _appBundleId = _appServicesConfig.app_settings.bundle_id; // 配置预设的 BundleId }