Global data repository
Treat it as Dictionary<string, object>
In fact data is stored in GUI.Canvas.GUIComponent.Userdata.
More...
|
static object | Get< TValue > (string key) |
|
static object | Get (string key) |
|
static void | Set (string key, object value) |
|
static bool | Has (string key) |
|
Global data repository
Treat it as Dictionary<string, object>
In fact data is stored in GUI.Canvas.GUIComponent.Userdata.
Definition at line 20 of file ModStorage.cs.
◆ Get()
static object CrabUI.ModStorage.Get |
( |
string | key | ) |
|
|
static |
Definition at line 38 of file ModStorage.cs.
39 {
40 Dictionary<string, object> repo = GetOrCreateRepo();
41 return repo.GetValueOrDefault(key);
42 }
◆ Has()
static bool CrabUI.ModStorage.Has |
( |
string | key | ) |
|
|
static |
Definition at line 48 of file ModStorage.cs.
49 {
50 Dictionary<string, object> repo = GetOrCreateRepo();
51 return repo.ContainsKey(key);
52 }
◆ Set()
static void CrabUI.ModStorage.Set |
( |
string | key, |
|
|
object | value ) |
|
static |
Definition at line 43 of file ModStorage.cs.
44 {
45 Dictionary<string, object> repo = GetOrCreateRepo();
46 repo[key] = value;
47 }
The documentation for this class was generated from the following file: