Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
魔术师Dix
UPM解决方案:苍耳
提交
8aa4811b
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,发现更多精彩内容 >>
提交
8aa4811b
编写于
12月 29, 2022
作者:
魔术师Dix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【UpmGitTool】启动时拉一个协程自动读取已下载的包,并调整界面显示;
上级
95812b3a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
20 deletion
+27
-20
UpmGitTool/Assets/GameRes/Prefab/HitstoryItem.prefab
UpmGitTool/Assets/GameRes/Prefab/HitstoryItem.prefab
+2
-2
UpmGitTool/Assets/Scenes/SampleScene.unity
UpmGitTool/Assets/Scenes/SampleScene.unity
+6
-6
UpmGitTool/Assets/Scritps/Core/AppRunner.cs
UpmGitTool/Assets/Scritps/Core/AppRunner.cs
+16
-10
UpmGitTool/Assets/Scritps/Core/AppState.cs
UpmGitTool/Assets/Scritps/Core/AppState.cs
+3
-2
未找到文件。
UpmGitTool/Assets/GameRes/Prefab/HitstoryItem.prefab
浏览文件 @
8aa4811b
...
...
@@ -253,7 +253,7 @@ MonoBehaviour:
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_text
:
2.2.4 (UpmGitExtension)
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
}
...
...
@@ -298,7 +298,7 @@ MonoBehaviour:
m_charWidthMaxAdj
:
0
m_enableWordWrapping
:
1
m_wordWrappingRatios
:
0.4
m_overflowMode
:
0
m_overflowMode
:
1
m_linkedTextComponent
:
{
fileID
:
0
}
parentLinkedComponent
:
{
fileID
:
0
}
m_enableKerning
:
1
...
...
UpmGitTool/Assets/Scenes/SampleScene.unity
浏览文件 @
8aa4811b
...
...
@@ -5885,7 +5885,7 @@ 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
:
-152.56996
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
-152.56996
,
y
:
0
.00047928447
}
m_SizeDelta
:
{
x
:
305.14
,
y
:
400.68
}
m_Pivot
:
{
x
:
0
,
y
:
1
}
---
!u!114
&1245554590
...
...
@@ -6547,7 +6547,7 @@ MonoBehaviour:
m_HandleRect
:
{
fileID
:
202069241
}
m_Direction
:
2
m_Value
:
0
m_Size
:
1
m_Size
:
0.999963
1
m_NumberOfSteps
:
0
m_OnValueChanged
:
m_PersistentCalls
:
...
...
@@ -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
:
202.05
,
y
:
133.51
8
}
m_SizeDelta
:
{
x
:
8
64.21
,
y
:
58.53
}
m_AnchoredPosition
:
{
x
:
186.45
,
y
:
132.6
8
}
m_SizeDelta
:
{
x
:
8
33.02
,
y
:
93.66
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1519007851
MonoBehaviour
:
...
...
@@ -7207,7 +7207,7 @@ MonoBehaviour:
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_text
:
https://gitcode.net/.........
m_text
:
https://gitcode.net/.........
https://gi
m_isRightToLeft
:
0
m_fontAsset
:
{
fileID
:
11400000
,
guid
:
6713738f712c7ac459acc1cd37b85c45
,
type
:
2
}
m_sharedMaterial
:
{
fileID
:
-953019786661498290
,
guid
:
6713738f712c7ac459acc1cd37b85c45
,
type
:
2
}
...
...
@@ -7252,7 +7252,7 @@ MonoBehaviour:
m_charWidthMaxAdj
:
0
m_enableWordWrapping
:
1
m_wordWrappingRatios
:
0.4
m_overflowMode
:
0
m_overflowMode
:
1
m_linkedTextComponent
:
{
fileID
:
0
}
parentLinkedComponent
:
{
fileID
:
0
}
m_enableKerning
:
1
...
...
UpmGitTool/Assets/Scritps/Core/AppRunner.cs
浏览文件 @
8aa4811b
...
...
@@ -12,7 +12,6 @@ using System.Collections;
using
System.Collections.Generic
;
using
System.IO
;
using
UnityEngine
;
using
UpmGitTool.UI
;
namespace
UpmGitTool
{
...
...
@@ -28,6 +27,8 @@ namespace UpmGitTool
AppState
.
Path_WorkingDirectory
=
WorkingDirectory
;
AppState
.
Path_NodeJsExe
=
NodeJsPath
;
GYEventsCenter
.
RegisterEventMsg
(
Lib
.
ON_ADD_GIT_FETCH_REQ
,
OnAddGitFetchReq
);
StartCoroutine
(
AutoReadFeatchResult
());
}
...
...
@@ -53,19 +54,24 @@ namespace UpmGitTool
[
FolderPath
(
AbsolutePath
=
true
)]
public
string
WorkingDirectory
;
[
Button
]
public
void
ReadFetchResult
()
private
IEnumerator
AutoReadFeatchResult
()
{
string
url
=
"https://e.coding.net/Cyf649669121/unitypackage/UnityPackage.git#GYGame_GYEcs"
;
string
lastName
=
url
.
GetGitLastName
();
Logger
.
LogError
(
lastName
);
string
resultDir
=
$"
{
WorkingDirectory
}
/Results-2.0.0"
;
string
resultDir
=
$"
{
AppState
.
Path_WorkingDirectory
}
/Results-2.0.0"
;
var
files
=
Directory
.
GetFiles
(
resultDir
,
$"*.json"
);
foreach
(
var
file
in
Directory
.
GetFiles
(
resultDir
,
$"*
{
lastName
}
.json"
))
Debug
.
LogError
(
file
);
foreach
(
var
file
in
files
)
{
if
(!
File
.
Exists
(
file
))
continue
;
var
text
=
File
.
ReadAllText
(
file
,
System
.
Text
.
Encoding
.
UTF8
);
yield
return
null
;
var
result
=
JsonUtility
.
FromJson
<
FetchResult
>(
text
);
yield
return
null
;
AppState
.
SetFetchResult
(
result
);
yield
return
null
;
}
}
private
void
OnAddGitFetchReq
(
string
msgId
,
object
data
)
{
if
(
reqCorotinue
!=
null
)
return
;
...
...
UpmGitTool/Assets/Scritps/Core/AppState.cs
浏览文件 @
8aa4811b
...
...
@@ -69,13 +69,14 @@ namespace UpmGitTool
private
static
void
AddPackage
(
PackageItem
item
)
{
UPackage
pkg
;
if
(
DictAllPackages
.
TryGetValue
(
item
.
PackageId
,
out
pkg
))
string
key
=
item
.
Name
;
if
(
DictAllPackages
.
TryGetValue
(
key
,
out
pkg
))
{
pkg
.
UpdateData
(
item
);
pkg
.
OnDataRefresh
();
}
else
DictAllPackages
.
Add
(
item
.
Name
,
new
UPackage
(
item
));
DictAllPackages
.
Add
(
key
,
new
UPackage
(
item
));
}
public
static
void
SetFetchResult
(
FetchResult
fetchRet
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录