Example #1
0
 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));
             }
         }
     }
 }
Example #2
0
 public static string GetString(string key)
 {
     return(RemoteSettings.GetString(key, ""));
 }
        public static string GetString(string key)
        {
            string defaultValue = "";

            return(RemoteSettings.GetString(key, defaultValue));
        }