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 +13 -1
- package/Editor/UniEditor.cs +15 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/Editor/UniEditor.cs
CHANGED
|
@@ -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
|
|
1154
|
-
|
|
1155
|
-
|
|
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($"
|
|
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.
|
|
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"}}
|