Search Results for

    Show / Hide Table of Contents

    Class DataStore

    Inheritance
    Object
    DataStore
    Implements
    IVariableSource
    Namespace: NoSuchStudio.DataStorage
    Assembly: NoSuchStudio-DataStorage.dll
    Syntax
    [ExecuteAlways]
    public class DataStore : NoSuchMonoBehaviour, ISerializationCallbackReceiver, IVariableSource

    Fields

    _serviceConnections

    Declaration
    protected Dictionary<Type, bool> _serviceConnections
    Field Value
    Type Description
    Dictionary<Type, Boolean>

    Properties

    disableSyncWithPrefs

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

    disableSyncWithVariables

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

    IsInitialized

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

    mono

    Declaration
    public MonoBehaviour mono { get; }
    Property Value
    Type Description
    UnityEngine.MonoBehaviour

    readOnly

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

    scope

    Declaration
    public Scope scope { get; set; }
    Property Value
    Type Description
    Scope

    Methods

    AddDataEntry(String, DataStore.KnownType, Object, Boolean, Boolean)

    Declaration
    public DataStore.DataEntry AddDataEntry(string key, DataStore.KnownType type, object val, bool syncToPrefs = true, bool syncToVariables = false)
    Parameters
    Type Name Description
    String key
    DataStore.KnownType type
    Object val
    Boolean syncToPrefs
    Boolean syncToVariables
    Returns
    Type Description
    DataStore.DataEntry

    AddDataEntryLocal(String, DataStore.KnownType, Object, Boolean, Boolean)

    Declaration
    public DataStore.DataEntry AddDataEntryLocal(string localKey, DataStore.KnownType type, object val, bool syncToPrefs = true, bool syncToVariables = false)
    Parameters
    Type Name Description
    String localKey
    DataStore.KnownType type
    Object val
    Boolean syncToPrefs
    Boolean syncToVariables
    Returns
    Type Description
    DataStore.DataEntry

    AddFloatDataEntry(String, Single, Boolean, Boolean)

    Declaration
    public DataStore.DataEntry AddFloatDataEntry(string key, float val, bool syncToPrefs = true, bool syncToVariables = false)
    Parameters
    Type Name Description
    String key
    Single val
    Boolean syncToPrefs
    Boolean syncToVariables
    Returns
    Type Description
    DataStore.DataEntry

    AddIntDataEntry(String, Int32, Boolean, Boolean)

    Declaration
    public DataStore.DataEntry AddIntDataEntry(string key, int val, bool syncToPrefs = true, bool syncToVariables = false)
    Parameters
    Type Name Description
    String key
    Int32 val
    Boolean syncToPrefs
    Boolean syncToVariables
    Returns
    Type Description
    DataStore.DataEntry

    AddStringDataEntry(String, String, Boolean, Boolean)

    Declaration
    public DataStore.DataEntry AddStringDataEntry(string key, string val, bool syncToPrefs = true, bool syncToVariables = false)
    Parameters
    Type Name Description
    String key
    String val
    Boolean syncToPrefs
    Boolean syncToVariables
    Returns
    Type Description
    DataStore.DataEntry

    Clear()

    Declaration
    public void Clear()

    Connect<ST>()

    Declaration
    public void Connect<ST>()
    
        where ST : Service<ST>
    Type Parameters
    Name Description
    ST

    ContainsKey(String)

    Declaration
    public bool ContainsKey(string k)
    Parameters
    Type Name Description
    String k
    Returns
    Type Description
    Boolean

    Delete(String)

    Declaration
    public bool Delete(string k)
    Parameters
    Type Name Description
    String k
    Returns
    Type Description
    Boolean

    DeleteLocal(String)

    Declaration
    public bool DeleteLocal(string lk)
    Parameters
    Type Name Description
    String lk
    Returns
    Type Description
    Boolean

    Disconnect<ST>()

    Declaration
    public void Disconnect<ST>()
    
        where ST : Service<ST>
    Type Parameters
    Name Description
    ST

    Get(String)

    Declaration
    public object Get(string k)
    Parameters
    Type Name Description
    String k
    Returns
    Type Description
    Object

    GetBoolLocal(String)

    Declaration
    public bool GetBoolLocal(string lk)
    Parameters
    Type Name Description
    String lk
    Returns
    Type Description
    Boolean

    GetEntry(String)

    Declaration
    public DataStore.DataEntry GetEntry(string k)
    Parameters
    Type Name Description
    String k
    Returns
    Type Description
    DataStore.DataEntry

    GetFloat(String)

    Declaration
    public float GetFloat(string k)
    Parameters
    Type Name Description
    String k
    Returns
    Type Description
    Single

    GetFloatLocal(String)

    Declaration
    public float GetFloatLocal(string lk)
    Parameters
    Type Name Description
    String lk
    Returns
    Type Description
    Single

    GetInt(String)

    Declaration
    public int GetInt(string k)
    Parameters
    Type Name Description
    String k
    Returns
    Type Description
    Int32

    GetIntLocal(String)

    Declaration
    public int GetIntLocal(string lk)
    Parameters
    Type Name Description
    String lk
    Returns
    Type Description
    Int32

    GetLocal(String)

    Declaration
    public object GetLocal(string lk)
    Parameters
    Type Name Description
    String lk
    Returns
    Type Description
    Object

    GetLocalEntry(String)

    Declaration
    public DataStore.DataEntry GetLocalEntry(string lk)
    Parameters
    Type Name Description
    String lk
    Returns
    Type Description
    DataStore.DataEntry

    GetString(String)

    Declaration
    public string GetString(string k)
    Parameters
    Type Name Description
    String k
    Returns
    Type Description
    String

    GetStringLocal(String)

    Declaration
    public string GetStringLocal(string lk)
    Parameters
    Type Name Description
    String lk
    Returns
    Type Description
    String

    GetVariable(String)

    Declaration
    public string GetVariable(string variable)
    Parameters
    Type Name Description
    String variable
    Returns
    Type Description
    String

    IsConnected<ST>()

    Declaration
    public bool IsConnected<ST>()
    
        where ST : Service<ST>
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    ST

    OnAfterDeserialize()

    Declaration
    public void OnAfterDeserialize()

    OnBeforeSerialize()

    Declaration
    public void OnBeforeSerialize()

    Set(String, Object)

    Declaration
    public void Set(string k, object v)
    Parameters
    Type Name Description
    String k
    Object v

    SetLocal(String, Object)

    Declaration
    public void SetLocal(string lk, object v)
    Parameters
    Type Name Description
    String lk
    Object v

    SetVariable(String, String)

    Declaration
    public bool SetVariable(string variable, string value)
    Parameters
    Type Name Description
    String variable
    String value
    Returns
    Type Description
    Boolean

    SyncFromPrefs(String)

    Declaration
    public bool SyncFromPrefs(string lk = null)
    Parameters
    Type Name Description
    String lk
    Returns
    Type Description
    Boolean

    SyncToPrefs(String)

    Declaration
    public void SyncToPrefs(string lk = null)
    Parameters
    Type Name Description
    String lk

    Implements

    IVariableSource
    In This Article
    Back to top Generated by DocFX