update: 添加 UUID 导入逻辑
							parent
							
								
									5494e6c3f9
								
							
						
					
					
						commit
						bc002d1501
					
				|  | @ -583,27 +583,30 @@ namespace Guru.Editor | |||
|             { | ||||
|                 // 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 | ||||
|                 p = n.serializedObject.FindProperty("IPMSetting.bundleId"); | ||||
|                 p.stringValue = _serviceConfig.app_settings.bundle_id; | ||||
|                 if (p != null) p.stringValue = _serviceConfig.app_settings.bundle_id; | ||||
|                 // 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 | ||||
|                 if (_serviceConfig.TokenValidTime() > 0) | ||||
|                 { | ||||
|                     p = n.serializedObject.FindProperty("IPMSetting.tokenValidTime"); | ||||
|                     p.intValue = _serviceConfig.TokenValidTime(); | ||||
|                     if (p != null) p.intValue = _serviceConfig.TokenValidTime(); | ||||
|                 } | ||||
|                 if (_serviceConfig.fb_settings != null) | ||||
|                 { | ||||
|                     // FB App ID | ||||
|                     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 | ||||
|                     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) | ||||
|             { | ||||
|                 p = n.serializedObject.FindProperty("AmazonSetting.Enable"); | ||||
|                 p.boolValue = true; | ||||
|                 if (p != null) p.boolValue = true; | ||||
|                  | ||||
|                 arr = _serviceConfig.ad_settings.amazon_ids_android; | ||||
|                 if (IsArrayHasLength(arr, 4)) | ||||
|                 { | ||||
|                     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.stringValue = arr[1]; | ||||
|                     if (p != null) p.stringValue = arr[1]; | ||||
|                     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.stringValue = arr[3]; | ||||
|                     if (p != null) p.stringValue = arr[3]; | ||||
|                 } | ||||
| 
 | ||||
|                 arr = _serviceConfig.ad_settings.amazon_ids_ios; | ||||
|                 if (IsArrayHasLength(arr, 4)) | ||||
|                 { | ||||
|                     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.stringValue = arr[1]; | ||||
|                     if (p != null) p.stringValue = arr[1]; | ||||
|                     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.stringValue = arr[3]; | ||||
|                     if (p != null) p.stringValue = arr[3]; | ||||
|                 } | ||||
|             } | ||||
|              | ||||
|  | @ -646,34 +649,34 @@ namespace Guru.Editor | |||
|             if (null != n) | ||||
|             { | ||||
|                 p = n.serializedObject.FindProperty("PubmaticSetting.Enable"); | ||||
|                 p.boolValue = true; | ||||
|                 if (p != null) p.boolValue = true; | ||||
| 
 | ||||
|                 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; | ||||
| 
 | ||||
|                 p = n.serializedObject.FindProperty("PubmaticSetting.iOS.storeUrl"); | ||||
|                 if(p != null) p.stringValue = _serviceConfig.app_settings.ios_store; | ||||
|                 if (p != null) p.stringValue = _serviceConfig.app_settings.ios_store; | ||||
|                  | ||||
|                 arr = _serviceConfig.ad_settings.pubmatic_ids_android; | ||||
|                 if (IsArrayHasLength(arr, 3)) | ||||
|                 { | ||||
|                     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.stringValue = arr[1]; | ||||
|                     if (p != null) p.stringValue = arr[1]; | ||||
|                     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; | ||||
|                 if (IsArrayHasLength(arr, 3)) | ||||
|                 { | ||||
|                     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.stringValue = arr[1]; | ||||
|                     if (p != null) p.stringValue = arr[1]; | ||||
|                     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) | ||||
|             { | ||||
|                 p = n.serializedObject.FindProperty("MolocoSetting.Enable"); | ||||
|                 p.boolValue = true; | ||||
|                 if (p != null) p.boolValue = true; | ||||
|                  | ||||
|                 arr = _serviceConfig.ad_settings.moloco_ids_android; | ||||
|                 if (IsArrayHasLength(arr, 3)) | ||||
|                 { | ||||
|                     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.stringValue = arr[1]; | ||||
|                     if (p != null) p.stringValue = arr[1]; | ||||
|                     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; | ||||
|                 if (IsArrayHasLength(arr, 3)) | ||||
|                 { | ||||
|                     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.stringValue = arr[1]; | ||||
|                     if (p != null) p.stringValue = arr[1]; | ||||
|                     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)) | ||||
|                 { | ||||
|                     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.stringValue = arr[1]; | ||||
|                     if (p != null) p.stringValue = arr[1]; | ||||
|                     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; | ||||
|                 if (IsArrayHasLength(arr, 3)) | ||||
|                 { | ||||
|                     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.stringValue = arr[1]; | ||||
|                     if (p != null) p.stringValue = arr[1]; | ||||
|                     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) | ||||
|             { | ||||
|                 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; | ||||
|                 if(IsArrayHasLength(arr, 3)) | ||||
|                 { | ||||
|                     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.stringValue = arr[1]; | ||||
|                     if (p != null) p.stringValue = arr[1]; | ||||
|                     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; | ||||
|                 if (IsArrayHasLength(arr, 3)) | ||||
|                 { | ||||
|                     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.stringValue = arr[1]; | ||||
|                     if (p != null) p.stringValue = arr[1]; | ||||
|                     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)) | ||||
|             { | ||||
|                 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.stringValue = _serviceConfig.adjust_settings.app_token[1]; | ||||
|                 if (p != null) p.stringValue = _serviceConfig.adjust_settings.app_token[1]; | ||||
|             } | ||||
| 
 | ||||
|             //----------- AnalyticsSetting ------------------- | ||||
|  | @ -781,13 +784,13 @@ namespace Guru.Editor | |||
|             if (null != n) | ||||
|             { | ||||
|                 p = n.serializedObject.FindProperty("AnalyticsSetting.levelEndSuccessNum"); | ||||
|                 p.intValue = _serviceConfig.LevelEndSuccessNum(); | ||||
|                 if (p != null) p.intValue = _serviceConfig.LevelEndSuccessNum(); | ||||
|                 p = n.serializedObject.FindProperty("AnalyticsSetting.enalbeFirebaseAnalytics"); | ||||
|                 p.boolValue = _serviceConfig.IsFirebaseEnabled(); | ||||
|                 if (p != null) p.boolValue = _serviceConfig.IsFirebaseEnabled(); | ||||
|                 p = n.serializedObject.FindProperty("AnalyticsSetting.enalbeFacebookAnalytics"); | ||||
|                 p.boolValue = _serviceConfig.IsFacebookEnabled(); | ||||
|                 if (p != null) p.boolValue = _serviceConfig.IsFacebookEnabled(); | ||||
|                 p = n.serializedObject.FindProperty("AnalyticsSetting.enalbeAdjustAnalytics"); | ||||
|                 p.boolValue = _serviceConfig.IsAdjustEnabled(); | ||||
|                 if (p != null) p.boolValue = _serviceConfig.IsAdjustEnabled(); | ||||
|                 p = n.serializedObject.FindProperty("AnalyticsSetting.adjustEventList"); | ||||
|                 if (null != p && IsArrayNotEmpty(_serviceConfig.adjust_settings.events)) | ||||
|                 { | ||||
|  |  | |||
|  | @ -64,6 +64,7 @@ namespace Guru | |||
|         public int TokenValidTime() => parameters?.token_vaild_time ?? 604800; | ||||
|         public int LevelEndSuccessNum() => parameters?.level_end_success_num ?? 50; | ||||
|         public string CdnHost() => parameters?.cdn_host ?? ""; | ||||
|         public bool UsingUUID() => parameters?.using_uuid ?? true; | ||||
|         //-------------------------------- Parameters -------------------------------- | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -329,6 +329,7 @@ namespace Guru | |||
|                                 _appServicesConfig.app_settings.terms_url, | ||||
|                                 _appServicesConfig.app_settings.android_store, | ||||
|                                 _appServicesConfig.app_settings.ios_store,  | ||||
|                                 _appServicesConfig.parameters.using_uuid.ToString().ToLower(), | ||||
|                                 _appServicesConfig.parameters.cdn_host ?? ""); | ||||
|                              | ||||
|                             _appBundleId = _appServicesConfig.app_settings.bundle_id; // 配置预设的 BundleId | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue