diff --git a/Runtime/Code/Config/GuruSDKInitConfig.cs b/Runtime/Code/Config/GuruSDKInitConfig.cs
index 93da344..f23b92e 100644
--- a/Runtime/Code/Config/GuruSDKInitConfig.cs
+++ b/Runtime/Code/Config/GuruSDKInitConfig.cs
@@ -24,6 +24,10 @@ namespace Guru
///
public bool AutoRecordFinishedLevels = true;
///
+ /// 自定义 Service 云控 Key
+ ///
+ public string CustomServiceKey = "";
+ ///
/// Debug模式(默认关闭)
///
public bool DebugMode = false;
diff --git a/Runtime/Code/SDK/GuruSDK.cs b/Runtime/Code/SDK/GuruSDK.cs
index 9d93838..e6d60aa 100644
--- a/Runtime/Code/SDK/GuruSDK.cs
+++ b/Runtime/Code/SDK/GuruSDK.cs
@@ -207,6 +207,9 @@ namespace Guru
#region App Remote Update
+ ///
+ /// Apply Cloud guru-service configs for sdk assets
+ ///
private void SetupServicesConfig()
{
bool useKeywords = false;
@@ -333,10 +336,20 @@ namespace Guru
});
}
}
-
+
+ ///
+ /// Get the guru-service cloud config value;
+ /// User can fetch the cloud guru-service config by using Custom Service Key
+ ///
+ ///
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(json);