From 8acd6faf9434d9296e6d92f7dbcd781429222225 Mon Sep 17 00:00:00 2001 From: huyufei Date: Thu, 6 Jun 2024 20:09:03 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=B8=BA=20GuruSDK.Remote=20?= =?UTF-8?q?=E5=8F=96=E5=80=BC=E6=B7=BB=E5=8A=A0=20defaultValue=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Code/SDK/GuruSDK.Remote.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Runtime/Code/SDK/GuruSDK.Remote.cs b/Runtime/Code/SDK/GuruSDK.Remote.cs index c3c6351..87bfdf2 100644 --- a/Runtime/Code/SDK/GuruSDK.Remote.cs +++ b/Runtime/Code/SDK/GuruSDK.Remote.cs @@ -30,12 +30,12 @@ namespace Guru { return RemoteConfigManager.GetConfig(key); } - public static string GetRemoteString(string key) => RemoteConfigManager.GetString(key); - public static int GetRemoteInt(string key) => RemoteConfigManager.GetInt(key); - public static long GetRemoteLong(string key) => RemoteConfigManager.GetLong(key); - public static double GetRemoteDouble(string key) => RemoteConfigManager.GetDouble(key); - public static float GetRemoteFloat(string key) => RemoteConfigManager.GetFloat(key); - public static bool GetRemoteBool(string key) => RemoteConfigManager.GetBool(key); + public static string GetRemoteString(string key, string defaultValue = "") => RemoteConfigManager.GetString(key, defaultValue); + public static int GetRemoteInt(string key, int defaultValue = 0) => RemoteConfigManager.GetInt(key, defaultValue); + public static long GetRemoteLong(string key, long defaultValue = 0 ) => RemoteConfigManager.GetLong(key, defaultValue); + public static double GetRemoteDouble(string key, double defaultValue = 0) => RemoteConfigManager.GetDouble(key, defaultValue); + public static float GetRemoteFloat(string key, float defaultValue = 0) => RemoteConfigManager.GetFloat(key, defaultValue); + public static bool GetRemoteBool(string key, bool defaultValue = false) => RemoteConfigManager.GetBool(key, defaultValue); public static void RegisterOnValueChanged(string key, Action onValueChanged)