private void FetchSettings()
 {
     RemoteConfigWebApiClient.fetchConfigsFinished += OnFetchRemoteSettingsFinished;
     try
     {
         RemoteConfigWebApiClient.FetchConfigs(Application.cloudProjectId, m_DataManager.GetCurrentEnvironmentId());
     }
     catch
     {
         RemoteConfigWebApiClient.fetchConfigsFinished -= OnFetchRemoteSettingsFinished;
         DoCleanUp();
     }
 }
        public void AddDefaultRule()
        {
            var newRule = new JObject();

            newRule["projectId"]         = Application.cloudProjectId;
            newRule["environmentId"]     = m_DataManager.GetCurrentEnvironmentId();
            newRule["configId"]          = m_DataManager.configId;
            newRule["id"]                = Guid.NewGuid().ToString();
            newRule["name"]              = GetNewRuleId();
            newRule["enabled"]           = false;
            newRule["priority"]          = RemoteConfigDataManager.defaultRulePriority;
            newRule["condition"]         = "";
            newRule["rolloutPercentage"] = 100;
            newRule["startDate"]         = "";
            newRule["endDate"]           = "";
            newRule["type"]              = "segmentation";
            newRule["value"]             = new JArray();
            m_DataManager.AddRule(newRule);
        }
Exemple #3
0
 public string GetCurrentEnvironmentId()
 {
     return(m_DataManager.GetCurrentEnvironmentId());
 }