Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
魔术师Dix
UPM解决方案:苍耳
提交
95812b3a
UPM解决方案:苍耳
项目概览
魔术师Dix
/
UPM解决方案:苍耳
通知
26
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
UPM解决方案:苍耳
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
95812b3a
编写于
12月 29, 2022
作者:
魔术师Dix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【UpmGitTool】更新版本选择逻辑,更新界面显示;
上级
116d2052
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
45 addition
and
35 deletion
+45
-35
UpmGitTool/Assets/GameRes/Prefab/HitstoryItem.prefab
UpmGitTool/Assets/GameRes/Prefab/HitstoryItem.prefab
+7
-6
UpmGitTool/Assets/Scenes/SampleScene.unity
UpmGitTool/Assets/Scenes/SampleScene.unity
+17
-17
UpmGitTool/Assets/Scritps/Core/Fetch/SemVersion.cs
UpmGitTool/Assets/Scritps/Core/Fetch/SemVersion.cs
+5
-0
UpmGitTool/Assets/Scritps/Core/Fetch/UPackage.cs
UpmGitTool/Assets/Scritps/Core/Fetch/UPackage.cs
+6
-9
UpmGitTool/Assets/Scritps/Core/Fetch/UpmPackageVersion.cs
UpmGitTool/Assets/Scritps/Core/Fetch/UpmPackageVersion.cs
+9
-2
UpmGitTool/Assets/Scritps/UI/MainWindow.cs
UpmGitTool/Assets/Scritps/UI/MainWindow.cs
+1
-1
未找到文件。
UpmGitTool/Assets/GameRes/Prefab/HitstoryItem.prefab
浏览文件 @
95812b3a
...
...
@@ -38,8 +38,8 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0
}
m_AnchorMax
:
{
x
:
0
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
180
,
y
:
50
}
m_AnchoredPosition
:
{
x
:
60.8006
,
y
:
0
}
m_SizeDelta
:
{
x
:
301.6012
,
y
:
50
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&4992096307994095352
CanvasRenderer
:
...
...
@@ -100,7 +100,6 @@ MonoBehaviour:
m_MinimumUnityVersion
:
m_DisplayName
:
m_Description
:
m_PackageUniqueId
:
m_Name
:
m_PackageId
:
m_Author
:
...
...
@@ -108,6 +107,8 @@ MonoBehaviour:
m_Dependencies
:
[]
m_DocumentationUrl
:
m_ChangelogUrl
:
m_RepositoryUrl
:
m_Url
:
SelectedColor
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
UnSelectedColor
:
{
r
:
0
,
g
:
0.5019608
,
b
:
1
,
a
:
1
}
---
!u!1
&4992096308915946629
...
...
@@ -221,8 +222,8 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
1
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
-
22.5
,
y
:
0
}
m_SizeDelta
:
{
x
:
-
55
,
y
:
50
}
m_AnchoredPosition
:
{
x
:
-
17.3552
,
y
:
0
}
m_SizeDelta
:
{
x
:
-
65.2897
,
y
:
50
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&4992096309375970350
CanvasRenderer
:
...
...
@@ -252,7 +253,7 @@ MonoBehaviour:
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_text
:
999.999.999
m_text
:
2.2.4 (UpmGitExtension)
m_isRightToLeft
:
0
m_fontAsset
:
{
fileID
:
11400000
,
guid
:
6713738f712c7ac459acc1cd37b85c45
,
type
:
2
}
m_sharedMaterial
:
{
fileID
:
-953019786661498290
,
guid
:
6713738f712c7ac459acc1cd37b85c45
,
type
:
2
}
...
...
UpmGitTool/Assets/Scenes/SampleScene.unity
浏览文件 @
95812b3a
...
...
@@ -769,8 +769,8 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
1
2
8.54
,
y
:
-110.36197
}
m_SizeDelta
:
{
x
:
1
1
84.5
,
y
:
197.48
}
m_AnchoredPosition
:
{
x
:
1
7
8.54
,
y
:
-110.36197
}
m_SizeDelta
:
{
x
:
1
0
84.5
,
y
:
197.48
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&139229363
MonoBehaviour
:
...
...
@@ -1070,7 +1070,7 @@ RectTransform:
m_RootOrder
:
-1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0
}
m_AnchorMax
:
{
x
:
1
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
20
,
y
:
20
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
...
...
@@ -1488,8 +1488,8 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
-
608.67
,
y
:
-46.004
}
m_SizeDelta
:
{
x
:
199.8
4
,
y
:
451.04
}
m_AnchoredPosition
:
{
x
:
-
543.24023
,
y
:
-46.005
}
m_SizeDelta
:
{
x
:
322.1
4
,
y
:
451.04
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&297420589
MonoBehaviour
:
...
...
@@ -2071,7 +2071,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&336766289
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -2950,9 +2950,9 @@ RectTransform:
m_RootOrder
:
-1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0
}
m_AnchorMax
:
{
x
:
1
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
-17
,
y
:
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0
,
y
:
1
}
---
!u!114
&482842297
MonoBehaviour
:
...
...
@@ -5885,8 +5885,8 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
1
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
-
91
,
y
:
0.00063440285
}
m_SizeDelta
:
{
x
:
182
,
y
:
383.99
}
m_AnchoredPosition
:
{
x
:
-
152.56996
,
y
:
0
}
m_SizeDelta
:
{
x
:
305.14
,
y
:
400.68
}
m_Pivot
:
{
x
:
0
,
y
:
1
}
---
!u!114
&1245554590
MonoBehaviour
:
...
...
@@ -5908,7 +5908,7 @@ MonoBehaviour:
m_ChildAlignment
:
1
m_StartCorner
:
0
m_StartAxis
:
0
m_CellSize
:
{
x
:
175
,
y
:
8
0
}
m_CellSize
:
{
x
:
300
,
y
:
5
0
}
m_Spacing
:
{
x
:
5
,
y
:
5
}
m_Constraint
:
0
m_ConstraintCount
:
2
...
...
@@ -6363,7 +6363,7 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
-1
15
,
y
:
31.517998
}
m_AnchoredPosition
:
{
x
:
-1
4.999992
,
y
:
31.517998
}
m_SizeDelta
:
{
x
:
697.41
,
y
:
58.53
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1326478349
...
...
@@ -7184,8 +7184,8 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
153.12999
,
y
:
133.518
}
m_SizeDelta
:
{
x
:
962.06
,
y
:
58.53
}
m_AnchoredPosition
:
{
x
:
202.05
,
y
:
133.518
}
m_SizeDelta
:
{
x
:
864.21
,
y
:
58.53
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1519007851
MonoBehaviour
:
...
...
@@ -7477,7 +7477,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&1652132970
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -7525,7 +7525,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&1662431187
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -8708,7 +8708,7 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
-
3
97
,
y
:
133.518
}
m_AnchoredPosition
:
{
x
:
-
2
97
,
y
:
133.518
}
m_SizeDelta
:
{
x
:
133.89
,
y
:
58.53
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1816679593
...
...
UpmGitTool/Assets/Scritps/Core/Fetch/SemVersion.cs
浏览文件 @
95812b3a
...
...
@@ -257,5 +257,10 @@ namespace UpmGitTool
return
value
.
Substring
(
startIndex
,
num
);
}
public
string
GetShortName
()
{
return
$"
{
Major
}
.
{
Minor
}
.
{
Patch
}
"
;
}
}
}
\ No newline at end of file
UpmGitTool/Assets/Scritps/Core/Fetch/UPackage.cs
浏览文件 @
95812b3a
...
...
@@ -51,13 +51,6 @@ namespace UpmGitTool
[
ShowInInspector
,
DisplayAsString
,
LabelText
(
"已安装"
)]
public
bool
IsInstalled
{
get
;
private
set
;
}
/// <summary>
/// 已安装的包版本号;
/// </summary>
[
LabelWidth
(
LabelWidth
)]
[
ShowInInspector
,
DisplayAsString
,
LabelText
(
"已安装版本"
)]
public
string
InstalledVersionString
{
get
;
private
set
;
}
/// <summary>
/// 已安装包的ID;
/// </summary>
...
...
@@ -65,6 +58,10 @@ namespace UpmGitTool
[
ShowInInspector
,
DisplayAsString
,
LabelText
(
"已安装包ID"
)]
public
string
InstallPackageId
{
get
;
private
set
;
}
[
LabelWidth
(
LabelWidth
)]
[
ShowInInspector
,
DisplayAsString
,
LabelText
(
"已安装版本"
)]
public
string
InstallVersionString
{
get
;
private
set
;
}
/// <summary>
/// 是否可以升级
/// </summary>
...
...
@@ -89,8 +86,8 @@ namespace UpmGitTool
IsInstalled
=
true
;
InstallPackageId
=
item
.
PackageId
;
IsGit
=
item
.
IsGitUrl
;
InstalledVersionString
=
item
.
PackageUrl
;
PackageUrl
=
item
.
PackageUrl
;
InstallVersionString
=
item
.
PackageUrl
;
RefreshInstalledVersion
();
}
...
...
@@ -143,7 +140,7 @@ namespace UpmGitTool
if
(
ver
.
PackageId
==
InstallPackageId
)
{
InstallVersion
=
ver
;
Install
ed
VersionString
=
ver
.
VersionString
;
InstallVersionString
=
ver
.
VersionString
;
break
;
}
}
...
...
UpmGitTool/Assets/Scritps/Core/Fetch/UpmPackageVersion.cs
浏览文件 @
95812b3a
...
...
@@ -9,6 +9,7 @@
using
Sirenix.OdinInspector
;
using
System
;
using
Unity.VisualScripting
;
using
UnityEngine
;
using
UpmGitTool.UI
;
...
...
@@ -85,8 +86,8 @@ namespace UpmGitTool
public
string
Name
=>
m_Name
;
public
string
PackageId
=>
m_PackageId
;
public
string
Author
=>
m_Author
;
public
string
VersionString
=>
m_VersionString
;
public
SemVersion
?
Version
{
get
;
private
set
;
}
public
string
VersionString
{
get
;
private
set
;
}
public
SemVersion
Version
{
get
;
private
set
;
}
public
DependencyInfo
[]
Dependencies
=>
m_Dependencies
;
public
string
DocumentationUrl
=>
m_DocumentationUrl
;
public
string
ChangelogUrl
=>
m_ChangelogUrl
;
...
...
@@ -97,6 +98,12 @@ namespace UpmGitTool
public
void
OnAfterDeserialize
()
{
Version
=
SemVersion
.
Parse
(
m_VersionString
);
string
semver
=
Version
.
GetShortName
();
string
revision
=
refName
;
VersionString
=
revision
.
Contains
(
semver
)
?
$"
{
semver
}
"
:
$"
{
semver
}
(
{
revision
}
)"
;
}
}
...
...
UpmGitTool/Assets/Scritps/UI/MainWindow.cs
浏览文件 @
95812b3a
...
...
@@ -75,7 +75,7 @@ namespace UpmGitTool.UI
Logger
.
Log
(
$"设置显示:
{
package
.
PackageName
}
"
);
LabelName
.
SetText
(
package
.
PackageName
);
LabelVersion
.
gameObject
.
SetActive
(
package
.
IsInstalled
);
if
(
package
.
IsInstalled
)
LabelVersion
.
SetText
(
package
.
Install
ed
VersionString
);
if
(
package
.
IsInstalled
)
LabelVersion
.
SetText
(
package
.
InstallVersionString
);
if
(!
package
.
IsGit
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录