Class DataStore
Implements
IVariableSource
Assembly: NoSuchStudio-DataStorage.dll
Syntax
[ExecuteAlways]
public class DataStore : NoSuchMonoBehaviour, ISerializationCallbackReceiver, IVariableSource
Fields
_serviceConnections
Declaration
protected Dictionary<Type, bool> _serviceConnections
Field Value
Properties
disableSyncWithPrefs
Declaration
public bool disableSyncWithPrefs { get; set; }
Property Value
disableSyncWithVariables
Declaration
public bool disableSyncWithVariables { get; set; }
Property Value
IsInitialized
Declaration
public bool IsInitialized { get; }
Property Value
mono
Declaration
public MonoBehaviour mono { get; }
Property Value
| Type |
Description |
| UnityEngine.MonoBehaviour |
|
readOnly
Declaration
public bool readOnly { get; set; }
Property Value
scope
Declaration
public Scope scope { get; set; }
Property Value
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
Returns
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
Returns
AddFloatDataEntry(String, Single, Boolean, Boolean)
Declaration
public DataStore.DataEntry AddFloatDataEntry(string key, float val, bool syncToPrefs = true, bool syncToVariables = false)
Parameters
Returns
AddIntDataEntry(String, Int32, Boolean, Boolean)
Declaration
public DataStore.DataEntry AddIntDataEntry(string key, int val, bool syncToPrefs = true, bool syncToVariables = false)
Parameters
Returns
AddStringDataEntry(String, String, Boolean, Boolean)
Declaration
public DataStore.DataEntry AddStringDataEntry(string key, string val, bool syncToPrefs = true, bool syncToVariables = false)
Parameters
Returns
Clear()
Declaration
Connect<ST>()
Declaration
public void Connect<ST>()
where ST : Service<ST>
Type Parameters
ContainsKey(String)
Declaration
public bool ContainsKey(string k)
Parameters
| Type |
Name |
Description |
| String |
k |
|
Returns
Delete(String)
Declaration
public bool Delete(string k)
Parameters
| Type |
Name |
Description |
| String |
k |
|
Returns
DeleteLocal(String)
Declaration
public bool DeleteLocal(string lk)
Parameters
| Type |
Name |
Description |
| String |
lk |
|
Returns
Disconnect<ST>()
Declaration
public void Disconnect<ST>()
where ST : Service<ST>
Type Parameters
Get(String)
Declaration
public object Get(string k)
Parameters
| Type |
Name |
Description |
| String |
k |
|
Returns
GetBoolLocal(String)
Declaration
public bool GetBoolLocal(string lk)
Parameters
| Type |
Name |
Description |
| String |
lk |
|
Returns
GetEntry(String)
Declaration
public DataStore.DataEntry GetEntry(string k)
Parameters
| Type |
Name |
Description |
| String |
k |
|
Returns
GetFloat(String)
Declaration
public float GetFloat(string k)
Parameters
| Type |
Name |
Description |
| String |
k |
|
Returns
GetFloatLocal(String)
Declaration
public float GetFloatLocal(string lk)
Parameters
| Type |
Name |
Description |
| String |
lk |
|
Returns
GetInt(String)
Declaration
public int GetInt(string k)
Parameters
| Type |
Name |
Description |
| String |
k |
|
Returns
GetIntLocal(String)
Declaration
public int GetIntLocal(string lk)
Parameters
| Type |
Name |
Description |
| String |
lk |
|
Returns
GetLocal(String)
Declaration
public object GetLocal(string lk)
Parameters
| Type |
Name |
Description |
| String |
lk |
|
Returns
GetLocalEntry(String)
Declaration
public DataStore.DataEntry GetLocalEntry(string lk)
Parameters
| Type |
Name |
Description |
| String |
lk |
|
Returns
GetString(String)
Declaration
public string GetString(string k)
Parameters
| Type |
Name |
Description |
| String |
k |
|
Returns
GetStringLocal(String)
Declaration
public string GetStringLocal(string lk)
Parameters
| Type |
Name |
Description |
| String |
lk |
|
Returns
GetVariable(String)
Declaration
public string GetVariable(string variable)
Parameters
| Type |
Name |
Description |
| String |
variable |
|
Returns
IsConnected<ST>()
Declaration
public bool IsConnected<ST>()
where ST : Service<ST>
Returns
Type Parameters
OnAfterDeserialize()
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Declaration
public void OnBeforeSerialize()
Set(String, Object)
Declaration
public void Set(string k, object v)
Parameters
SetLocal(String, Object)
Declaration
public void SetLocal(string lk, object v)
Parameters
SetVariable(String, String)
Declaration
public bool SetVariable(string variable, string value)
Parameters
Returns
SyncFromPrefs(String)
Declaration
public bool SyncFromPrefs(string lk = null)
Parameters
| Type |
Name |
Description |
| String |
lk |
|
Returns
SyncToPrefs(String)
Declaration
public void SyncToPrefs(string lk = null)
Parameters
| Type |
Name |
Description |
| String |
lk |
|
Implements
IVariableSource