update: add custom guru-service key
							parent
							
								
									6275afac9b
								
							
						
					
					
						commit
						d17a6e2eae
					
				|  | @ -24,6 +24,10 @@ namespace Guru | |||
|         /// </summary> | ||||
|         public bool AutoRecordFinishedLevels = true; | ||||
|         /// <summary> | ||||
|         /// 自定义 Service 云控 Key | ||||
|         /// </summary> | ||||
|         public string CustomServiceKey = ""; | ||||
|         /// <summary> | ||||
|         /// Debug模式(默认关闭) | ||||
|         /// </summary> | ||||
|         public bool DebugMode = false; | ||||
|  |  | |||
|  | @ -207,6 +207,9 @@ namespace Guru | |||
| 
 | ||||
|         #region App Remote Update | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Apply Cloud guru-service configs for sdk assets | ||||
|         /// </summary> | ||||
|         private void SetupServicesConfig() | ||||
|         { | ||||
|             bool useKeywords = false; | ||||
|  | @ -333,10 +336,20 @@ namespace Guru | |||
|                 }); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|          | ||||
|         /// <summary> | ||||
|         /// Get the guru-service cloud config value; | ||||
|         /// User can fetch the cloud guru-service config by using Custom Service Key | ||||
|         /// </summary> | ||||
|         /// <returns></returns> | ||||
|         private GuruServicesConfig GetRemoteServicesConfig() | ||||
|         { | ||||
|             var json = GetRemoteString(ServicesConfigKey); | ||||
|             string key = ServicesConfigKey; | ||||
|             if (!string.IsNullOrEmpty(_initConfig.CustomServiceKey)) | ||||
|             { | ||||
|                 key = _initConfig.CustomServiceKey; | ||||
|             } | ||||
|             var json = GetRemoteString(key); | ||||
|             if (!string.IsNullOrEmpty(json)) | ||||
|             { | ||||
|                 return JsonParser.ToObject<GuruServicesConfig>(json); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue