com.typhoon.unitysdk 1.0.98 → 1.0.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/Editor/INIConfig.cs +9 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/Editor/INIConfig.cs
CHANGED
|
@@ -18,7 +18,7 @@ namespace TyphoonUnitySDK
|
|
|
18
18
|
_filePath = filePath;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
private void Set<T>(string
|
|
21
|
+
private void Set<T>(string inputKey, T value, Func<T, string> func)
|
|
22
22
|
{
|
|
23
23
|
CreateFileIfNotExists();
|
|
24
24
|
var lines = File.ReadAllLines(_filePath).ToList();
|
|
@@ -34,11 +34,11 @@ namespace TyphoonUnitySDK
|
|
|
34
34
|
|
|
35
35
|
return new { key, value };
|
|
36
36
|
}).ToList();
|
|
37
|
-
var match = items.LastOrDefault(e => e.key ==
|
|
37
|
+
var match = items.LastOrDefault(e => e.key == inputKey);
|
|
38
38
|
if (match == null)
|
|
39
39
|
{
|
|
40
40
|
//新增条目
|
|
41
|
-
items.Add(new { key =
|
|
41
|
+
items.Add(new { key = inputKey, value = func(value) });
|
|
42
42
|
}
|
|
43
43
|
else
|
|
44
44
|
{
|
|
@@ -58,19 +58,19 @@ namespace TyphoonUnitySDK
|
|
|
58
58
|
File.WriteAllText(_filePath, sb.ToString());
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
public void Set(string
|
|
61
|
+
public void Set(string inputKey, int value)
|
|
62
62
|
{
|
|
63
|
-
Set(
|
|
63
|
+
Set(inputKey, value, e => e.ToString());
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
public void Set(string
|
|
66
|
+
public void Set(string inputKey, float value)
|
|
67
67
|
{
|
|
68
|
-
Set(
|
|
68
|
+
Set(inputKey, value, e => e.ToString());
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
public void Set(string
|
|
71
|
+
public void Set(string inputKey, string value)
|
|
72
72
|
{
|
|
73
|
-
Set(
|
|
73
|
+
Set(inputKey, value, e => e.ToString());
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
private string Get(string key)
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.0.
|
|
1
|
+
{"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.0.99","description":"","unity":"2018.1","type":"tool","hideInEditor":false,"author":{"name":"Jan Zhang","email":"","url":""},"changelogUrl":"","documentationUrl":"","keywords":["typhoon"],"license":"","licensesUrl":"","customDependencies":[{"PackageName":"com.unity.nuget.newtonsoft-json","Value":"3.2.0"}],"version_log":"## [1.0.99] - 2024-10-30\r\n\r\n### 修复\n* iniconfig 命名bug\r\n\r\n","major_flag":false,"write_time_stamp":1730275028000,"others":{"items":[]},"dependencies":{"com.unity.nuget.newtonsoft-json":"3.2.0"}}
|