Definition at line 4 of file SourceAsset.cs.
◆ _LoadPrefs()
static void SourceAsset._LoadPrefs |
( |
string |
id = "prefs" | ) |
|
|
inlinestatic |
Definition at line 78 of file SourceAsset.cs.
79 {
81 Prefs prefs =
IO.LoadFile<Prefs>(
PrefPath + id);
84 {
85 if (prefs.things.dict.ContainsKey(row.id))
86 {
87 row.pref = prefs.things.dict[row.id];
88 }
89 if (prefs.version == 0)
90 {
91 row.pref.y = 0f;
92 }
93 }
95 {
96 if (prefs.charas.dict.ContainsKey(row2.id))
97 {
98 row2.pref = prefs.charas.dict[row2.id];
99 }
100 }
101 Debug.Log(
"Imported Prefs:" +
id);
102 }
static SourceManager sources
static void CopyAs(string fromPath, string toPath)
References SourceAsset.Prefs.charas, SourceManager.charas, Debug, SourceAsset.PrefData.dict, PrefPath, EClass.sources, SourceAsset.Prefs.things, SourceManager.things, and SourceAsset.Prefs.version.
Referenced by LoadPrefs(), and LoadPrefs_bk().
◆ _SavePrefs()
static void SourceAsset._SavePrefs |
( |
string |
id = "prefs" | ) |
|
|
inlinestatic |
Definition at line 35 of file SourceAsset.cs.
36 {
38 Prefs prefs = new Prefs();
39 prefs.version = 2;
43 {
44 if (prefs.things.dict.ContainsKey(row.id))
45 {
46 Debug.LogError(
"exception: duplicate id:" + row.id +
"/" + row.name);
47 }
48 else
49 {
50 prefs.things.dict.Add(row.id, row.pref);
51 }
52 }
54 {
55 if (prefs.charas.dict.ContainsKey(row2.id))
56 {
57 Debug.LogError(
"exception: duplicate id:" + row2.id +
"/" + row2.name);
58 }
59 else
60 {
61 prefs.charas.dict.Add(row2.id, row2.pref);
62 }
63 }
65 Debug.Log(
"Exported Prefs:" +
id);
66 }
static void SaveFile(string path, object obj, bool compress=false, JsonSerializerSettings setting=null)
References SourceAsset.Prefs.charas, SourceManager.charas, Debug, SourceAsset.PrefData.dict, PrefPath, EClass.sources, SourceAsset.Prefs.things, and SourceManager.things.
Referenced by SavePrefs().
◆ DoFix()
void SourceAsset.DoFix |
( |
| ) |
|
|
inline |
◆ LoadPrefs()
void SourceAsset.LoadPrefs |
( |
| ) |
|
|
inline |
◆ LoadPrefs_bk()
void SourceAsset.LoadPrefs_bk |
( |
| ) |
|
|
inline |
◆ SavePrefs()
void SourceAsset.SavePrefs |
( |
string |
id = "prefs" | ) |
|
|
inline |
◆ idLoad
string SourceAsset.idLoad = "prefs" |
◆ renames
◆ PrefPath
string SourceAsset.PrefPath |
|
staticget |
The documentation for this class was generated from the following file: