com.typhoon.unitysdk 1.0.62 → 1.0.64

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 CHANGED
@@ -1,7 +1,19 @@
1
1
  # 更新日志
2
- ## [1.0.62] - 2023-12-10
2
+ ## [1.0.64] - 2023-12-10
3
3
 
4
4
  ### 其它
5
+ * 测试更新1
6
+
7
+
8
+ ## [1.0.63] - 2023-12-10
9
+
10
+ ### 修复
11
+ * 更新逻辑
12
+
13
+
14
+ ## [1.0.62] - 2023-12-10
15
+
16
+ ### 其它
5
17
  * 测试包2
6
18
 
7
19
 
@@ -9,7 +9,6 @@ using System.Text;
9
9
  using System.Text.RegularExpressions;
10
10
  using System.Threading.Tasks;
11
11
  using UnityEditor;
12
- using UnityEditor.PackageManager;
13
12
  using UnityEngine;
14
13
  using AlphaDirectory = Alphaleonis.Win32.Filesystem.Directory;
15
14
  using Debug = UnityEngine.Debug;
@@ -1150,13 +1149,24 @@ namespace TyphoonUnitySDK
1150
1149
  var package = $"Packages/manifest.json";
1151
1150
  if (File.Exists(package))
1152
1151
  {
1153
- var pack = $"com.typhoon.unitysdk@{versionInfo.Version}";
1154
- Client.Add(pack);
1155
- Debug.Log($"写入:{pack} 完毕,等待刷新");
1152
+ var pattern = $"\"com.typhoon.unitysdk\"[\\s]*:[\\s]*\"{current.Version}\"";
1153
+ var replace = $"\"com.typhoon.unitysdk\": \"{versionInfo.Version}\"";
1154
+ var manifest = File.ReadAllText(package);
1155
+ if (Regex.IsMatch(manifest, pattern))
1156
+ {
1157
+ manifest = Regex.Replace(manifest, pattern, replace);
1158
+ File.WriteAllText(package, manifest);
1159
+ AssetDatabase.Refresh();
1160
+ Debug.Log($"写入:{package} 完毕,等待刷新");
1161
+ }
1162
+ else
1163
+ {
1164
+ Debug.LogError($"失败,找不到 com.typhoon.unitysdk 条目");
1165
+ }
1156
1166
  }
1157
1167
  else
1158
1168
  {
1159
- Debug.LogError($"找不到{package}");
1169
+ Debug.LogError($"失败,找不到{package}");
1160
1170
  }
1161
1171
  }
1162
1172
  catch (Exception e)
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.0.62","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":"2.0.0"}],"version_log":"## [1.0.62] - 2023-12-10\r\n\r\n### 其它\n* 测试包2\r\n\r\n","major_flag":false,"write_time_stamp":1702195671000,"others":{"items":[]},"dependencies":{"com.unity.nuget.newtonsoft-json":"2.0.0"}}
1
+ {"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.0.64","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":"2.0.0"}],"version_log":"## [1.0.64] - 2023-12-10\r\n\r\n### 其它\n* 测试更新1\r\n\r\n","major_flag":false,"write_time_stamp":1702196196000,"others":{"items":[]},"dependencies":{"com.unity.nuget.newtonsoft-json":"2.0.0"}}