com.typhoon.unitysdk 1.0.50 → 1.0.51
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 +10 -1
- package/Editor/ChangelogPreviewerWindow.cs +14 -1
- package/Editor/UniEditor.cs +12 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,8 @@ namespace TyphoonUnitySDK
|
|
|
12
12
|
private static void Open()
|
|
13
13
|
{
|
|
14
14
|
_changelog = null;
|
|
15
|
+
_versionInfo = null;
|
|
16
|
+
_showInstallBtn = false;
|
|
15
17
|
var win = GetWindow<ChangelogPreviewerWindow>();
|
|
16
18
|
win.minSize = new Vector2(600, 800);
|
|
17
19
|
win.titleContent = new GUIContent("更新日志");
|
|
@@ -19,9 +21,11 @@ namespace TyphoonUnitySDK
|
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
public static void Open(string changelog)
|
|
24
|
+
public static void Open(string changelog, bool showInstallBtn, PackageVersionInfo versionInfo)
|
|
23
25
|
{
|
|
24
26
|
_changelog = changelog;
|
|
27
|
+
_versionInfo = versionInfo;
|
|
28
|
+
_showInstallBtn = showInstallBtn;
|
|
25
29
|
var win = GetWindow<ChangelogPreviewerWindow>();
|
|
26
30
|
win.minSize = new Vector2(600, 800);
|
|
27
31
|
win.titleContent = new GUIContent("更新日志");
|
|
@@ -29,6 +33,8 @@ namespace TyphoonUnitySDK
|
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
private static string _changelog;
|
|
36
|
+
private static PackageVersionInfo _versionInfo;
|
|
37
|
+
private static bool _showInstallBtn = false;
|
|
32
38
|
private static Vector2 _scroll;
|
|
33
39
|
private static GUIStyle _styleTxt;
|
|
34
40
|
|
|
@@ -67,6 +73,13 @@ namespace TyphoonUnitySDK
|
|
|
67
73
|
_scroll = GUILayout.BeginScrollView(_scroll);
|
|
68
74
|
GUILayout.TextArea(Changelog, StyleTxt);
|
|
69
75
|
GUILayout.EndScrollView();
|
|
76
|
+
if (_showInstallBtn && _versionInfo != null)
|
|
77
|
+
{
|
|
78
|
+
if (GUILayout.Button("安装", GUILayout.Height(32)))
|
|
79
|
+
{
|
|
80
|
+
UniEditor.UpdateInstallVersion(_versionInfo);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
70
83
|
}
|
|
71
84
|
}
|
|
72
85
|
}
|
package/Editor/UniEditor.cs
CHANGED
|
@@ -836,9 +836,9 @@ namespace TyphoonUnitySDK
|
|
|
836
836
|
}
|
|
837
837
|
|
|
838
838
|
//检查更新
|
|
839
|
-
public static bool CheckUpdate()
|
|
839
|
+
public static bool CheckUpdate(bool force = false)
|
|
840
840
|
{
|
|
841
|
-
if (!Preferences.Default.CheckUpdate)
|
|
841
|
+
if (!Preferences.Default.CheckUpdate && force == false)
|
|
842
842
|
{
|
|
843
843
|
return false;
|
|
844
844
|
}
|
|
@@ -856,7 +856,7 @@ namespace TyphoonUnitySDK
|
|
|
856
856
|
{
|
|
857
857
|
case 0:
|
|
858
858
|
{
|
|
859
|
-
|
|
859
|
+
UpdateInstallVersion(CheckUpdateCacheData.Default.Latest);
|
|
860
860
|
}
|
|
861
861
|
break;
|
|
862
862
|
case 1:
|
|
@@ -866,8 +866,8 @@ namespace TyphoonUnitySDK
|
|
|
866
866
|
break;
|
|
867
867
|
case 2:
|
|
868
868
|
{
|
|
869
|
-
|
|
870
|
-
|
|
869
|
+
ChangelogPreviewerWindow.Open(CheckUpdateCacheData.Default.CombineChangelog(), true,
|
|
870
|
+
CheckUpdateCacheData.Default.Latest);
|
|
871
871
|
}
|
|
872
872
|
break;
|
|
873
873
|
}
|
|
@@ -880,9 +880,9 @@ namespace TyphoonUnitySDK
|
|
|
880
880
|
}
|
|
881
881
|
|
|
882
882
|
//检查是否存在重大版本修复
|
|
883
|
-
public static bool CheckMajor()
|
|
883
|
+
public static bool CheckMajor(bool force = false)
|
|
884
884
|
{
|
|
885
|
-
if (!Preferences.Default.CheckMajor)
|
|
885
|
+
if (!Preferences.Default.CheckMajor && force == false)
|
|
886
886
|
{
|
|
887
887
|
return false;
|
|
888
888
|
}
|
|
@@ -917,7 +917,7 @@ namespace TyphoonUnitySDK
|
|
|
917
917
|
{
|
|
918
918
|
case 0:
|
|
919
919
|
{
|
|
920
|
-
|
|
920
|
+
UpdateInstallVersion(CheckUpdateCacheData.Default.Latest);
|
|
921
921
|
}
|
|
922
922
|
break;
|
|
923
923
|
case 1:
|
|
@@ -927,8 +927,8 @@ namespace TyphoonUnitySDK
|
|
|
927
927
|
break;
|
|
928
928
|
case 2:
|
|
929
929
|
{
|
|
930
|
-
|
|
931
|
-
|
|
930
|
+
ChangelogPreviewerWindow.Open(CheckUpdateCacheData.Default.CombineChangelog(), true,
|
|
931
|
+
CheckUpdateCacheData.Default.Latest);
|
|
932
932
|
}
|
|
933
933
|
break;
|
|
934
934
|
}
|
|
@@ -962,11 +962,11 @@ namespace TyphoonUnitySDK
|
|
|
962
962
|
if (flag)
|
|
963
963
|
{
|
|
964
964
|
//检查完毕
|
|
965
|
-
var popUp = CheckMajor();
|
|
965
|
+
var popUp = CheckMajor(true);
|
|
966
966
|
//如果没有检查完毕
|
|
967
967
|
if (!popUp)
|
|
968
968
|
{
|
|
969
|
-
popUp = CheckUpdate();
|
|
969
|
+
popUp = CheckUpdate(true);
|
|
970
970
|
}
|
|
971
971
|
|
|
972
972
|
if (!popUp)
|
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.51","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.51] - 2023-12-10\r\n\r\n### 修复\n* 修复检查自动更新的bug\r\n\r\n### 优化\n* 自动更新是查看日志窗口添加安装按钮\r\n\r\n","major_flag":true,"write_time_stamp":1702190445000,"others":{"items":[]},"dependencies":{"com.unity.nuget.newtonsoft-json":"2.0.0"}}
|