Class RemoteConfigDataStore | Remote Config | 1.3.2-preview.10
docs.unity3d.com
    Show / Hide Table of Contents

    Class RemoteConfigDataStore

    Inheritance
    Object
    Object
    ScriptableObject
    RemoteConfigDataStore
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: Unity.RemoteConfig.Editor
    Syntax
    public class RemoteConfigDataStore : ScriptableObject, ISerializationCallbackReceiver

    Fields

    _environments

    Declaration
    public string _environments
    Field Value
    Type Description
    String

    _lastCachedRulesList

    Declaration
    public string _lastCachedRulesList
    Field Value
    Type Description
    String

    _rsKeyList

    Declaration
    public string _rsKeyList
    Field Value
    Type Description
    String

    _rsLastCachedKeyList

    Declaration
    public string _rsLastCachedKeyList
    Field Value
    Type Description
    String

    _rulesList

    Declaration
    public string _rulesList
    Field Value
    Type Description
    String

    defaultRulePriority

    Declaration
    public readonly int defaultRulePriority
    Field Value
    Type Description
    Int32

    rsTypes

    Declaration
    public static readonly List<string> rsTypes
    Field Value
    Type Description
    List<String>

    Properties

    addedRulesIDs

    Declaration
    public List<string> addedRulesIDs { get; set; }
    Property Value
    Type Description
    List<String>

    config

    Declaration
    public JObject config { get; set; }
    Property Value
    Type Description
    JObject

    configId

    Declaration
    public string configId { get; set; }
    Property Value
    Type Description
    String

    currentEnvironmentId

    Declaration
    public string currentEnvironmentId { get; set; }
    Property Value
    Type Description
    String

    currentEnvironmentIsDefault

    Declaration
    public bool currentEnvironmentIsDefault { get; set; }
    Property Value
    Type Description
    Boolean

    currentEnvironmentName

    Declaration
    public string currentEnvironmentName { get; set; }
    Property Value
    Type Description
    String

    dataStoreStatus

    Declaration
    public RemoteConfigDataStore.m_DataStoreStatus dataStoreStatus { get; set; }
    Property Value
    Type Description
    RemoteConfigDataStore.m_DataStoreStatus

    deletedRulesIDs

    Declaration
    public List<string> deletedRulesIDs { get; set; }
    Property Value
    Type Description
    List<String>

    environments

    Declaration
    public JArray environments { get; set; }
    Property Value
    Type Description
    JArray

    lastCachedRulesList

    Declaration
    public JArray lastCachedRulesList { get; set; }
    Property Value
    Type Description
    JArray

    rsKeyList

    Declaration
    public JArray rsKeyList { get; set; }
    Property Value
    Type Description
    JArray

    rsLastCachedKeyList

    Declaration
    public JArray rsLastCachedKeyList { get; set; }
    Property Value
    Type Description
    JArray

    rulesList

    Declaration
    public JArray rulesList { get; set; }
    Property Value
    Type Description
    JArray

    settingsCount

    Declaration
    public int settingsCount { get; }
    Property Value
    Type Description
    Int32

    updatedRulesIDs

    Declaration
    public List<string> updatedRulesIDs { get; set; }
    Property Value
    Type Description
    List<String>

    Methods

    AddRule(JObject)

    Adds a rule to the Rules data store. This will add it to the rulesList.

    Declaration
    public void AddRule(JObject newRule)
    Parameters
    Type Name Description
    JObject newRule

    The RuleWithSettingsMetadata to be added

    AddSetting(JObject)

    Adds a setting to the Remote Settings data store. This will add the setting to the rsKeyList.

    Declaration
    public void AddSetting(JObject newSetting)
    Parameters
    Type Name Description
    JObject newSetting

    The setting to be added

    AddSettingToRule(String, String)

    Adds the given setting to the given rule.

    Declaration
    public void AddSettingToRule(string selectedRuleId, string entityId)
    Parameters
    Type Name Description
    String selectedRuleId

    ID of the rule that the setting should be added to

    String entityId

    EntityId of the setting to be added to the given rule

    CheckEnvironmentsValid()

    Checks if set of environments is valid. There must be exactly one default environment.

    Declaration
    public void CheckEnvironmentsValid()

    ClearUpdatedRulesLists()

    Clears the list of added rule ID's, list of updated rule ID's, and the list of deleted rule ID's.

    Declaration
    public void ClearUpdatedRulesLists()

    DeleteRule(String)

    Deletes a rule from the Rules data store. This will delete it from the rulesList.

    Declaration
    public void DeleteRule(string deletedRuleID)
    Parameters
    Type Name Description
    String deletedRuleID

    ID of the Rule to be deleted

    DeleteSetting(String)

    Deletes a setting from the Remote Settings data store. This will delete the setting from the rsKeyList.

    Declaration
    public void DeleteSetting(string entityId)
    Parameters
    Type Name Description
    String entityId

    The EntityId of the setting to be deleted

    DeleteSettingFromRule(String, String)

    Deletes the given setting to the given Rule.

    Declaration
    public void DeleteSettingFromRule(string ruleId, string entityId)
    Parameters
    Type Name Description
    String ruleId

    ID of the rule that the setting should be deleted from

    String entityId

    EntityId of the setting to be deleted from the given rule

    EnableOrDisableRule(String, Boolean)

    Enables or disables the given rule.

    Declaration
    public void EnableOrDisableRule(string ruleId, bool enabled)
    Parameters
    Type Name Description
    String ruleId

    ID of Rule to be enabled or disabled

    Boolean enabled

    true = enabled, false = disabled

    GetRuleAtIndex(Int32)

    Gets the RuleWithSettingsMetadata at the given index in the rulesList.

    Declaration
    public JObject GetRuleAtIndex(int selectedRuleIndex)
    Parameters
    Type Name Description
    Int32 selectedRuleIndex

    The index of the RuleWithSettingsMetadata we are getting from the rulesList

    Returns
    Type Description
    JObject

    The RuleWithSettingsMetadata from the rulesList at the given index

    GetRuleByID(String)

    Gets the RuleWithSettingsMetadata for the given Rule Id.

    Declaration
    public JObject GetRuleByID(string ruleId)
    Parameters
    Type Name Description
    String ruleId

    The Id of the RuleWithSettingsMetadata that we want to get

    Returns
    Type Description
    JObject

    The RuleWithSettingsMetadata from the rulesList for the given index

    GetSettingsListForRule(String)

    Returns list of settings for particular rule

    Declaration
    public JArray GetSettingsListForRule(string ruleId)
    Parameters
    Type Name Description
    String ruleId

    ID of the rule

    Returns
    Type Description
    JArray

    list of settings used by the given rule

    HasRules()

    Checks to see if any rules exist

    Declaration
    public bool HasRules()
    Returns
    Type Description
    Boolean

    true if there is at leave one rule and false if there are no rules

    IsSettingInRule(String, String)

    Checks if the given setting is being used by the given rule

    Declaration
    public bool IsSettingInRule(string ruleId, string rsEntityId)
    Parameters
    Type Name Description
    String ruleId

    ID of the rule that needs to be checked

    String rsEntityId

    EntityId of the setting that needs to be checked

    Returns
    Type Description
    Boolean

    true if the given setting is being used by the given rule

    OnAfterDeserialize()

    Declaration
    public void OnAfterDeserialize()
    Implements
    ISerializationCallbackReceiver.OnAfterDeserialize()

    OnBeforeSerialize()

    Declaration
    public void OnBeforeSerialize()
    Implements
    ISerializationCallbackReceiver.OnBeforeSerialize()

    RemoveRuleFromAddedRuleIDs(String)

    Removes the given rule ID from the list of added rules ID's.

    Declaration
    public void RemoveRuleFromAddedRuleIDs(string ruleId)
    Parameters
    Type Name Description
    String ruleId

    ID of the rule to be removed from the list of added rule ID's

    RemoveRuleFromDeletedRuleIDs(String)

    Removes the given rule ID from the list of deleted rule ID's.

    Declaration
    public void RemoveRuleFromDeletedRuleIDs(string ruleId)
    Parameters
    Type Name Description
    String ruleId

    ID of the rule to be remove from the list of deleted rule ID's

    RemoveRuleFromUpdatedRuleIDs(String)

    Removes the given rule ID from the list of updated rule ID's.

    Declaration
    public void RemoveRuleFromUpdatedRuleIDs(string ruleId)
    Parameters
    Type Name Description
    String ruleId

    ID of the rule to be removed from the list of updated rule ID's

    RestoreLastSelectedEnvironment(String)

    Returns the name of the last selected environment that is stored in EditorPrefs.

    Declaration
    public string RestoreLastSelectedEnvironment(string defaultEnvironment)
    Parameters
    Type Name Description
    String defaultEnvironment

    The default environment name to be returned if last selected environment is not found

    Returns
    Type Description
    String

    Name of last selected environment or defaultEnvironment if last selected is not found

    SetCurrentEnvironment(JObject)

    Sets the the current environment ID name.

    Declaration
    public void SetCurrentEnvironment(JObject currentEnvironment)
    Parameters
    Type Name Description
    JObject currentEnvironment

    Current Environment object containing the current environment name and ID

    SetDefaultEnvironment(String)

    Sets the default environment.

    Declaration
    public void SetDefaultEnvironment(string defaultEnvironmentId)
    Parameters
    Type Name Description
    String defaultEnvironmentId

    default Environment ID

    SetLastSelectedEnvironment(String)

    Sets the name of the last selected environment and stores it in EditorPrefs.

    Declaration
    public void SetLastSelectedEnvironment(string environmentName)
    Parameters
    Type Name Description
    String environmentName

    Name of environment to be stored

    UpdateRule(JObject, JObject)

    Declaration
    public void UpdateRule(JObject oldRule, JObject newRule)
    Parameters
    Type Name Description
    JObject oldRule
    JObject newRule

    UpdateRuleAttributes(String, JObject)

    Updates the attributes for a given rule. This will update the rule in the rulesList.

    Declaration
    public void UpdateRuleAttributes(string ruleId, JObject newRule)
    Parameters
    Type Name Description
    String ruleId

    ID of the rule being updated

    JObject newRule

    RuleWithSettingsMetadata object containing the new attributes

    UpdateRuleId(String, String)

    Declaration
    public void UpdateRuleId(string oldRuleId, string newRuleId)
    Parameters
    Type Name Description
    String oldRuleId
    String newRuleId

    UpdateRuleType(String, String)

    Updates the type of a given rule.

    Declaration
    public void UpdateRuleType(string ruleId, string newType)
    Parameters
    Type Name Description
    String ruleId

    ID of the rule being updated

    String newType

    New type for the rule

    UpdateSetting(JObject, JObject)

    Updates a setting in the Remote Settings data store. This will update the setting in the rsKeyList.

    Declaration
    public void UpdateSetting(JObject oldSetting, JObject newSetting)
    Parameters
    Type Name Description
    JObject oldSetting

    The RsKvtData of the setting to be updated

    JObject newSetting

    The new setting with the updated fields

    UpdateSettingForRule(String, JObject)

    Updates the value of the given setting for the given rule.

    Declaration
    public void UpdateSettingForRule(string ruleId, JObject updatedSetting)
    Parameters
    Type Name Description
    String ruleId

    ID of the rule that the updated setting belong to

    JObject updatedSetting

    A RsKvtData containing the updated value

    ValidateRule(JObject)

    Checks to see if the given Rule's attributes are within the accepted range.

    Declaration
    public bool ValidateRule(JObject rule)
    Parameters
    Type Name Description
    JObject rule

    RuleWithSettingsMetadata object to be validated

    Returns
    Type Description
    Boolean

    true if the rule is valid and false if the rule is not valid

    ValidateRuleName(JObject)

    Checks to see if the given rule's name is valid.

    Declaration
    public bool ValidateRuleName(JObject rule)
    Parameters
    Type Name Description
    JObject rule

    RuleWithSettingsMetadata object to be validated

    Returns
    Type Description
    Boolean

    true if the rule's name is valid, false if it is not valid

    ValidateRulePriority(JObject)

    Checks to see if the given rule's priority is valid.

    Declaration
    public bool ValidateRulePriority(JObject rule)
    Parameters
    Type Name Description
    JObject rule

    RuleWithSettingsMetadata object to be validated

    Returns
    Type Description
    Boolean

    true if the rule's priority is valid, false if it is not valid

    Events

    EnvironmentChanged

    Declaration
    public event Action EnvironmentChanged
    Event Type
    Type Description
    Action

    RemoteSettingDataStoreChanged

    Declaration
    public event Action RemoteSettingDataStoreChanged
    Event Type
    Type Description
    Action

    RulesDataStoreChanged

    Declaration
    public event Action RulesDataStoreChanged
    Event Type
    Type Description
    Action
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023