void RemoteSettingsUpdated() { for (int i = 0; i < m_DriveableProperty.fields.Count; i++) { var f = m_DriveableProperty.fields[i]; if (!string.IsNullOrEmpty(f.rsKeyName) && RS.HasKey(f.rsKeyName) && f.target != null && !string.IsNullOrEmpty(f.fieldPath)) { //Type doesn't work with a switch, so let's do it this way if (f.type == "bool") { f.SetValue(RS.GetBool(f.rsKeyName)); } else if (f.type == "float") { f.SetValue(RS.GetFloat(f.rsKeyName)); } else if (f.type == "int") { f.SetValue(RS.GetInt(f.rsKeyName)); } else if (f.type == "string") { f.SetValue(RS.GetString(f.rsKeyName)); } } } }
public static bool GetBool(string key) { return(RemoteSettings.GetBool(key, false)); }
public static bool GetBool(string key) { bool defaultValue = false; return(RemoteSettings.GetBool(key, defaultValue)); }