跳转到主要内容

查询数据

查询用于远程控制应用程序的数据。

调用信息

RemoteConfig.Init(string tableCode, PlayNANOORemoteConfigCallback callback) {}

调用详细信息

参数说明类型
tableCode表代码string
callback通信结果PlayNANOORemoteConfigCallback

源代码

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

void Awake()
{
plugin = Plugin.GetInstance();

plugin.RemoteConfig.Init("tableCode", (isSuccess) => {
if (isSuccess)
{
Debug.Log(plugin.RemoteConfig.GetString("tableCode", "variableKey", "defaultValue"));
Debug.Log(plugin.RemoteConfig.GetJson("tableCode", "variableKey", "defaultValue"));
Debug.Log(plugin.RemoteConfig.GetInteger("tableCode", "variableKey", 0));
Debug.Log(plugin.RemoteConfig.GetFloat("tableCode", "variableKey", 0));
Debug.Log(plugin.RemoteConfig.GetDouble("tableCode", "variableKey", 0));
Debug.Log(plugin.RemoteConfig.GetBool("tableCode", "variableKey", true));
}
else
{
Debug.Log("Fail");
}
});
}
}

变量调用信息

RemoteConfig.GetString(string tableCode, string variableKey);
RemoteConfig.GetString(string tableCode, string variableKey, string defaultValue);

RemoteConfig.GetJson(string tableCode, string variableKey);
RemoteConfig.GetJson(string tableCode, string variableKey, string defaultValue);

RemoteConfig.GetInteger(string tableCode, string variableKey);
RemoteConfig.GetInteger(string tableCode, string variableKey, integer defaultValue);

RemoteConfig.GetFloat(string tableCode, string variableKey);
RemoteConfig.GetFloat(string tableCode, string variableKey, float defaultValue);

RemoteConfig.GetDouble(string tableCode, string variableKey);
RemoteConfig.GetDouble(string tableCode, string variableKey, double defaultValue);

RemoteConfig.GetBool(string tableCode, string variableKey);
RemoteConfig.GetBool(string tableCode, string variableKey, double defaultValue);

变量调用详细信息

参数说明类型
tableCode表代码string
variableKey变量键string
{DEFULAT_VALUE}默认值object