update: 添加 UUID 导入逻辑
parent
5494e6c3f9
commit
bc002d1501
|
|
@ -583,27 +583,30 @@ namespace Guru.Editor
|
||||||
{
|
{
|
||||||
// AppID
|
// AppID
|
||||||
p = n.serializedObject.FindProperty("IPMSetting.appID");
|
p = n.serializedObject.FindProperty("IPMSetting.appID");
|
||||||
p.stringValue = _serviceConfig.app_settings.app_id;
|
if (p != null) p.stringValue = _serviceConfig.app_settings.app_id;
|
||||||
// BundleID
|
// BundleID
|
||||||
p = n.serializedObject.FindProperty("IPMSetting.bundleId");
|
p = n.serializedObject.FindProperty("IPMSetting.bundleId");
|
||||||
p.stringValue = _serviceConfig.app_settings.bundle_id;
|
if (p != null) p.stringValue = _serviceConfig.app_settings.bundle_id;
|
||||||
// CdnHost
|
// CdnHost
|
||||||
p = n.serializedObject.FindProperty("IPMSetting.cdnHost");
|
p = n.serializedObject.FindProperty("IPMSetting.cdnHost");
|
||||||
p.stringValue = _serviceConfig.CdnHost();
|
if (p != null) p.stringValue = _serviceConfig.CdnHost();
|
||||||
|
// CdnHost
|
||||||
|
p = n.serializedObject.FindProperty("IPMSetting.usingUUID");
|
||||||
|
if (p != null) p.boolValue = _serviceConfig.UsingUUID();
|
||||||
// tokenValidTime
|
// tokenValidTime
|
||||||
if (_serviceConfig.TokenValidTime() > 0)
|
if (_serviceConfig.TokenValidTime() > 0)
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("IPMSetting.tokenValidTime");
|
p = n.serializedObject.FindProperty("IPMSetting.tokenValidTime");
|
||||||
p.intValue = _serviceConfig.TokenValidTime();
|
if (p != null) p.intValue = _serviceConfig.TokenValidTime();
|
||||||
}
|
}
|
||||||
if (_serviceConfig.fb_settings != null)
|
if (_serviceConfig.fb_settings != null)
|
||||||
{
|
{
|
||||||
// FB App ID
|
// FB App ID
|
||||||
p = n.serializedObject.FindProperty("IPMSetting.fbAppId");
|
p = n.serializedObject.FindProperty("IPMSetting.fbAppId");
|
||||||
p.stringValue = _serviceConfig.fb_settings.fb_app_id;
|
if (p != null) p.stringValue = _serviceConfig.fb_settings.fb_app_id;
|
||||||
// FB Client Token
|
// FB Client Token
|
||||||
p = n.serializedObject.FindProperty("IPMSetting.fbClientToken");
|
p = n.serializedObject.FindProperty("IPMSetting.fbClientToken");
|
||||||
p.stringValue = _serviceConfig.fb_settings.fb_client_token;
|
if (p != null) p.stringValue = _serviceConfig.fb_settings.fb_client_token;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -612,32 +615,32 @@ namespace Guru.Editor
|
||||||
if (null != n)
|
if (null != n)
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("AmazonSetting.Enable");
|
p = n.serializedObject.FindProperty("AmazonSetting.Enable");
|
||||||
p.boolValue = true;
|
if (p != null) p.boolValue = true;
|
||||||
|
|
||||||
arr = _serviceConfig.ad_settings.amazon_ids_android;
|
arr = _serviceConfig.ad_settings.amazon_ids_android;
|
||||||
if (IsArrayHasLength(arr, 4))
|
if (IsArrayHasLength(arr, 4))
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("AmazonSetting.Android.appID");
|
p = n.serializedObject.FindProperty("AmazonSetting.Android.appID");
|
||||||
p.stringValue = arr[0];
|
if (p != null) p.stringValue = arr[0];
|
||||||
p = n.serializedObject.FindProperty("AmazonSetting.Android.bannerSlotID");
|
p = n.serializedObject.FindProperty("AmazonSetting.Android.bannerSlotID");
|
||||||
p.stringValue = arr[1];
|
if (p != null) p.stringValue = arr[1];
|
||||||
p = n.serializedObject.FindProperty("AmazonSetting.Android.interSlotID");
|
p = n.serializedObject.FindProperty("AmazonSetting.Android.interSlotID");
|
||||||
p.stringValue = arr[2];
|
if (p != null) p.stringValue = arr[2];
|
||||||
p = n.serializedObject.FindProperty("AmazonSetting.Android.rewardSlotID");
|
p = n.serializedObject.FindProperty("AmazonSetting.Android.rewardSlotID");
|
||||||
p.stringValue = arr[3];
|
if (p != null) p.stringValue = arr[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
arr = _serviceConfig.ad_settings.amazon_ids_ios;
|
arr = _serviceConfig.ad_settings.amazon_ids_ios;
|
||||||
if (IsArrayHasLength(arr, 4))
|
if (IsArrayHasLength(arr, 4))
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("AmazonSetting.iOS.appID");
|
p = n.serializedObject.FindProperty("AmazonSetting.iOS.appID");
|
||||||
p.stringValue = arr[0];
|
if (p != null) p.stringValue = arr[0];
|
||||||
p = n.serializedObject.FindProperty("AmazonSetting.iOS.bannerSlotID");
|
p = n.serializedObject.FindProperty("AmazonSetting.iOS.bannerSlotID");
|
||||||
p.stringValue = arr[1];
|
if (p != null) p.stringValue = arr[1];
|
||||||
p = n.serializedObject.FindProperty("AmazonSetting.iOS.interSlotID");
|
p = n.serializedObject.FindProperty("AmazonSetting.iOS.interSlotID");
|
||||||
p.stringValue = arr[2];
|
if (p != null) p.stringValue = arr[2];
|
||||||
p = n.serializedObject.FindProperty("AmazonSetting.iOS.rewardSlotID");
|
p = n.serializedObject.FindProperty("AmazonSetting.iOS.rewardSlotID");
|
||||||
p.stringValue = arr[3];
|
if (p != null) p.stringValue = arr[3];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -646,7 +649,7 @@ namespace Guru.Editor
|
||||||
if (null != n)
|
if (null != n)
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("PubmaticSetting.Enable");
|
p = n.serializedObject.FindProperty("PubmaticSetting.Enable");
|
||||||
p.boolValue = true;
|
if (p != null) p.boolValue = true;
|
||||||
|
|
||||||
p = n.serializedObject.FindProperty("PubmaticSetting.Android.storeUrl");
|
p = n.serializedObject.FindProperty("PubmaticSetting.Android.storeUrl");
|
||||||
if (p != null) p.stringValue = _serviceConfig.app_settings.android_store;
|
if (p != null) p.stringValue = _serviceConfig.app_settings.android_store;
|
||||||
|
|
@ -658,22 +661,22 @@ namespace Guru.Editor
|
||||||
if (IsArrayHasLength(arr, 3))
|
if (IsArrayHasLength(arr, 3))
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("PubmaticSetting.Android.bannerUnitID");
|
p = n.serializedObject.FindProperty("PubmaticSetting.Android.bannerUnitID");
|
||||||
p.stringValue = arr[0];
|
if (p != null) p.stringValue = arr[0];
|
||||||
p = n.serializedObject.FindProperty("PubmaticSetting.Android.interUnitID");
|
p = n.serializedObject.FindProperty("PubmaticSetting.Android.interUnitID");
|
||||||
p.stringValue = arr[1];
|
if (p != null) p.stringValue = arr[1];
|
||||||
p = n.serializedObject.FindProperty("PubmaticSetting.Android.rewardUnitID");
|
p = n.serializedObject.FindProperty("PubmaticSetting.Android.rewardUnitID");
|
||||||
p.stringValue = arr[2];
|
if (p != null) p.stringValue = arr[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
arr = _serviceConfig.ad_settings.pubmatic_ids_ios;
|
arr = _serviceConfig.ad_settings.pubmatic_ids_ios;
|
||||||
if (IsArrayHasLength(arr, 3))
|
if (IsArrayHasLength(arr, 3))
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("PubmaticSetting.iOS.bannerUnitID");
|
p = n.serializedObject.FindProperty("PubmaticSetting.iOS.bannerUnitID");
|
||||||
p.stringValue = arr[0];
|
if (p != null) p.stringValue = arr[0];
|
||||||
p = n.serializedObject.FindProperty("PubmaticSetting.iOS.interUnitID");
|
p = n.serializedObject.FindProperty("PubmaticSetting.iOS.interUnitID");
|
||||||
p.stringValue = arr[1];
|
if (p != null) p.stringValue = arr[1];
|
||||||
p = n.serializedObject.FindProperty("PubmaticSetting.iOS.rewardUnitID");
|
p = n.serializedObject.FindProperty("PubmaticSetting.iOS.rewardUnitID");
|
||||||
p.stringValue = arr[2];
|
if (p != null) p.stringValue = arr[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -682,28 +685,28 @@ namespace Guru.Editor
|
||||||
if (null != n)
|
if (null != n)
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("MolocoSetting.Enable");
|
p = n.serializedObject.FindProperty("MolocoSetting.Enable");
|
||||||
p.boolValue = true;
|
if (p != null) p.boolValue = true;
|
||||||
|
|
||||||
arr = _serviceConfig.ad_settings.moloco_ids_android;
|
arr = _serviceConfig.ad_settings.moloco_ids_android;
|
||||||
if (IsArrayHasLength(arr, 3))
|
if (IsArrayHasLength(arr, 3))
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("MolocoSetting.Android.bannerTestUnitID");
|
p = n.serializedObject.FindProperty("MolocoSetting.Android.bannerTestUnitID");
|
||||||
p.stringValue = arr[0];
|
if (p != null) p.stringValue = arr[0];
|
||||||
p = n.serializedObject.FindProperty("MolocoSetting.Android.interTestUnitID");
|
p = n.serializedObject.FindProperty("MolocoSetting.Android.interTestUnitID");
|
||||||
p.stringValue = arr[1];
|
if (p != null) p.stringValue = arr[1];
|
||||||
p = n.serializedObject.FindProperty("MolocoSetting.Android.rewardTestUnitID");
|
p = n.serializedObject.FindProperty("MolocoSetting.Android.rewardTestUnitID");
|
||||||
p.stringValue = arr[2];
|
if (p != null) p.stringValue = arr[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
arr = _serviceConfig.ad_settings.moloco_ids_ios;
|
arr = _serviceConfig.ad_settings.moloco_ids_ios;
|
||||||
if (IsArrayHasLength(arr, 3))
|
if (IsArrayHasLength(arr, 3))
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("MolocoSetting.iOS.bannerTestUnitID");
|
p = n.serializedObject.FindProperty("MolocoSetting.iOS.bannerTestUnitID");
|
||||||
p.stringValue = arr[0];
|
if (p != null) p.stringValue = arr[0];
|
||||||
p = n.serializedObject.FindProperty("MolocoSetting.iOS.interTestUnitID");
|
p = n.serializedObject.FindProperty("MolocoSetting.iOS.interTestUnitID");
|
||||||
p.stringValue = arr[1];
|
if (p != null) p.stringValue = arr[1];
|
||||||
p = n.serializedObject.FindProperty("MolocoSetting.iOS.rewardTestUnitID");
|
p = n.serializedObject.FindProperty("MolocoSetting.iOS.rewardTestUnitID");
|
||||||
p.stringValue = arr[2];
|
if (p != null) p.stringValue = arr[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -715,22 +718,22 @@ namespace Guru.Editor
|
||||||
if (IsArrayHasLength(arr, 3))
|
if (IsArrayHasLength(arr, 3))
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("TradplusSetting.Android.bannerUnitID");
|
p = n.serializedObject.FindProperty("TradplusSetting.Android.bannerUnitID");
|
||||||
p.stringValue = arr[0];
|
if (p != null) p.stringValue = arr[0];
|
||||||
p = n.serializedObject.FindProperty("TradplusSetting.Android.interUnitID");
|
p = n.serializedObject.FindProperty("TradplusSetting.Android.interUnitID");
|
||||||
p.stringValue = arr[1];
|
if (p != null) p.stringValue = arr[1];
|
||||||
p = n.serializedObject.FindProperty("TradplusSetting.Android.rewardUnitID");
|
p = n.serializedObject.FindProperty("TradplusSetting.Android.rewardUnitID");
|
||||||
p.stringValue = arr[2];
|
if (p != null) p.stringValue = arr[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
arr = _serviceConfig.ad_settings.tradplus_ids_ios;
|
arr = _serviceConfig.ad_settings.tradplus_ids_ios;
|
||||||
if (IsArrayHasLength(arr, 3))
|
if (IsArrayHasLength(arr, 3))
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("TradplusSetting.iOS.bannerUnitID");
|
p = n.serializedObject.FindProperty("TradplusSetting.iOS.bannerUnitID");
|
||||||
p.stringValue = arr[0];
|
if (p != null) p.stringValue = arr[0];
|
||||||
p = n.serializedObject.FindProperty("TradplusSetting.iOS.interUnitID");
|
p = n.serializedObject.FindProperty("TradplusSetting.iOS.interUnitID");
|
||||||
p.stringValue = arr[1];
|
if (p != null) p.stringValue = arr[1];
|
||||||
p = n.serializedObject.FindProperty("TradplusSetting.iOS.rewardUnitID");
|
p = n.serializedObject.FindProperty("TradplusSetting.iOS.rewardUnitID");
|
||||||
p.stringValue = arr[2];
|
if (p != null) p.stringValue = arr[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -739,28 +742,28 @@ namespace Guru.Editor
|
||||||
if (null != n)
|
if (null != n)
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("ADSetting.SDK_KEY");
|
p = n.serializedObject.FindProperty("ADSetting.SDK_KEY");
|
||||||
p.stringValue = _serviceConfig.ad_settings.sdk_key;
|
if (p != null) p.stringValue = _serviceConfig.ad_settings.sdk_key;
|
||||||
|
|
||||||
arr = _serviceConfig.ad_settings.max_ids_android;
|
arr = _serviceConfig.ad_settings.max_ids_android;
|
||||||
if(IsArrayHasLength(arr, 3))
|
if(IsArrayHasLength(arr, 3))
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("ADSetting.Android_Banner_ID");
|
p = n.serializedObject.FindProperty("ADSetting.Android_Banner_ID");
|
||||||
p.stringValue = arr[0];
|
if (p != null) p.stringValue = arr[0];
|
||||||
p = n.serializedObject.FindProperty("ADSetting.Android_Interstitial_ID");
|
p = n.serializedObject.FindProperty("ADSetting.Android_Interstitial_ID");
|
||||||
p.stringValue = arr[1];
|
if (p != null) p.stringValue = arr[1];
|
||||||
p = n.serializedObject.FindProperty("ADSetting.Android_Rewarded_ID");
|
p = n.serializedObject.FindProperty("ADSetting.Android_Rewarded_ID");
|
||||||
p.stringValue = arr[2];
|
if (p != null) p.stringValue = arr[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
arr = _serviceConfig.ad_settings.max_ids_ios;
|
arr = _serviceConfig.ad_settings.max_ids_ios;
|
||||||
if (IsArrayHasLength(arr, 3))
|
if (IsArrayHasLength(arr, 3))
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("ADSetting.IOS_Banner_ID");
|
p = n.serializedObject.FindProperty("ADSetting.IOS_Banner_ID");
|
||||||
p.stringValue = arr[0];
|
if (p != null) p.stringValue = arr[0];
|
||||||
p = n.serializedObject.FindProperty("ADSetting.IOS_Interstitial_ID");
|
p = n.serializedObject.FindProperty("ADSetting.IOS_Interstitial_ID");
|
||||||
p.stringValue = arr[1];
|
if (p != null) p.stringValue = arr[1];
|
||||||
p = n.serializedObject.FindProperty("ADSetting.IOS_Rewarded_ID");
|
p = n.serializedObject.FindProperty("ADSetting.IOS_Rewarded_ID");
|
||||||
p.stringValue = arr[2];
|
if (p != null) p.stringValue = arr[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -770,10 +773,10 @@ namespace Guru.Editor
|
||||||
&& IsArrayHasLength(_serviceConfig.adjust_settings.app_token, 2))
|
&& IsArrayHasLength(_serviceConfig.adjust_settings.app_token, 2))
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("AdjustSetting.androidAppToken");
|
p = n.serializedObject.FindProperty("AdjustSetting.androidAppToken");
|
||||||
p.stringValue = _serviceConfig.adjust_settings.app_token[0];
|
if (p != null) p.stringValue = _serviceConfig.adjust_settings.app_token[0];
|
||||||
|
|
||||||
p = n.serializedObject.FindProperty("AdjustSetting.iOSAppToken");
|
p = n.serializedObject.FindProperty("AdjustSetting.iOSAppToken");
|
||||||
p.stringValue = _serviceConfig.adjust_settings.app_token[1];
|
if (p != null) p.stringValue = _serviceConfig.adjust_settings.app_token[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------- AnalyticsSetting -------------------
|
//----------- AnalyticsSetting -------------------
|
||||||
|
|
@ -781,13 +784,13 @@ namespace Guru.Editor
|
||||||
if (null != n)
|
if (null != n)
|
||||||
{
|
{
|
||||||
p = n.serializedObject.FindProperty("AnalyticsSetting.levelEndSuccessNum");
|
p = n.serializedObject.FindProperty("AnalyticsSetting.levelEndSuccessNum");
|
||||||
p.intValue = _serviceConfig.LevelEndSuccessNum();
|
if (p != null) p.intValue = _serviceConfig.LevelEndSuccessNum();
|
||||||
p = n.serializedObject.FindProperty("AnalyticsSetting.enalbeFirebaseAnalytics");
|
p = n.serializedObject.FindProperty("AnalyticsSetting.enalbeFirebaseAnalytics");
|
||||||
p.boolValue = _serviceConfig.IsFirebaseEnabled();
|
if (p != null) p.boolValue = _serviceConfig.IsFirebaseEnabled();
|
||||||
p = n.serializedObject.FindProperty("AnalyticsSetting.enalbeFacebookAnalytics");
|
p = n.serializedObject.FindProperty("AnalyticsSetting.enalbeFacebookAnalytics");
|
||||||
p.boolValue = _serviceConfig.IsFacebookEnabled();
|
if (p != null) p.boolValue = _serviceConfig.IsFacebookEnabled();
|
||||||
p = n.serializedObject.FindProperty("AnalyticsSetting.enalbeAdjustAnalytics");
|
p = n.serializedObject.FindProperty("AnalyticsSetting.enalbeAdjustAnalytics");
|
||||||
p.boolValue = _serviceConfig.IsAdjustEnabled();
|
if (p != null) p.boolValue = _serviceConfig.IsAdjustEnabled();
|
||||||
p = n.serializedObject.FindProperty("AnalyticsSetting.adjustEventList");
|
p = n.serializedObject.FindProperty("AnalyticsSetting.adjustEventList");
|
||||||
if (null != p && IsArrayNotEmpty(_serviceConfig.adjust_settings.events))
|
if (null != p && IsArrayNotEmpty(_serviceConfig.adjust_settings.events))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ namespace Guru
|
||||||
public int TokenValidTime() => parameters?.token_vaild_time ?? 604800;
|
public int TokenValidTime() => parameters?.token_vaild_time ?? 604800;
|
||||||
public int LevelEndSuccessNum() => parameters?.level_end_success_num ?? 50;
|
public int LevelEndSuccessNum() => parameters?.level_end_success_num ?? 50;
|
||||||
public string CdnHost() => parameters?.cdn_host ?? "";
|
public string CdnHost() => parameters?.cdn_host ?? "";
|
||||||
|
public bool UsingUUID() => parameters?.using_uuid ?? true;
|
||||||
//-------------------------------- Parameters --------------------------------
|
//-------------------------------- Parameters --------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -329,6 +329,7 @@ namespace Guru
|
||||||
_appServicesConfig.app_settings.terms_url,
|
_appServicesConfig.app_settings.terms_url,
|
||||||
_appServicesConfig.app_settings.android_store,
|
_appServicesConfig.app_settings.android_store,
|
||||||
_appServicesConfig.app_settings.ios_store,
|
_appServicesConfig.app_settings.ios_store,
|
||||||
|
_appServicesConfig.parameters.using_uuid.ToString().ToLower(),
|
||||||
_appServicesConfig.parameters.cdn_host ?? "");
|
_appServicesConfig.parameters.cdn_host ?? "");
|
||||||
|
|
||||||
_appBundleId = _appServicesConfig.app_settings.bundle_id; // 配置预设的 BundleId
|
_appBundleId = _appServicesConfig.app_settings.bundle_id; // 配置预设的 BundleId
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue