Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
林新发
UnityXFramework
提交
080fc965
U
UnityXFramework
项目概览
林新发
/
UnityXFramework
通知
1399
Star
143
Fork
77
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
U
UnityXFramework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
080fc965
编写于
11月 11, 2021
作者:
L
linxinfa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
框架更新
上级
7a964eaf
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
11 deletion
+11
-11
Assets/Editor/ResConfig/ResConfigEditor.cs
Assets/Editor/ResConfig/ResConfigEditor.cs
+6
-6
Assets/Scripts/Framework/Common/Util/XMLUtil.cs
Assets/Scripts/Framework/Common/Util/XMLUtil.cs
+3
-3
Assets/Scripts/Framework/I18N/I18N.cs
Assets/Scripts/Framework/I18N/I18N.cs
+1
-1
Assets/Scripts/Framework/Resource/ResourcePathBuilder.cs
Assets/Scripts/Framework/Resource/ResourcePathBuilder.cs
+1
-1
未找到文件。
Assets/Editor/ResConfig/ResConfigEditor.cs
浏览文件 @
080fc965
...
...
@@ -184,7 +184,7 @@ public class ResConfigManager
private
XmlDocument
getResourceElement
(
string
name
,
out
string
filePath
,
out
XmlElement
item
)
{
filePath
=
ResourcePathBuilder
.
Build
Essential
ConfigPath
(
"resources"
);
filePath
=
ResourcePathBuilder
.
BuildConfigPath
(
"resources"
);
XmlDocument
doc
=
getConfElementByName
(
name
,
filePath
,
out
item
);
return
doc
;
}
...
...
@@ -303,7 +303,7 @@ public class ResConfigManager
return
ResEditorErrorCode
.
ArgsError
;
}
string
filePath
=
ResourcePathBuilder
.
Build
Essential
ConfigPath
(
fileName
);
string
filePath
=
ResourcePathBuilder
.
BuildConfigPath
(
fileName
);
XmlDocument
doc
=
XMLUtil
.
getXMLFromFile
(
filePath
);
XmlNode
rootNode
=
doc
.
SelectSingleNode
(
rootItem
);
XmlNodeList
items
=
doc
.
GetElementsByTagName
(
item
);
...
...
@@ -332,7 +332,7 @@ public class ResConfigManager
string
sourcepath
,
string
description
)
{
int
id
=
map1
.
Count
>
0
?
map1
.
Keys
.
Max
()
+
1
:
1
;
string
filePath
=
ResourcePathBuilder
.
Build
Essential
ConfigPath
(
resourceConf
);
string
filePath
=
ResourcePathBuilder
.
BuildConfigPath
(
resourceConf
);
XmlDocument
doc
=
XMLUtil
.
getXMLFromFile
(
filePath
);
XmlNode
rootNode
=
doc
.
SelectSingleNode
(
"items"
);
XmlElement
item
=
doc
.
CreateElement
(
"item"
);
...
...
@@ -366,7 +366,7 @@ public class ResConfigManager
private
ResEditorErrorCode
appendAudioConf
(
string
fname
,
int
resID
,
float
volume
)
{
string
filePath
=
ResourcePathBuilder
.
Build
Essential
ConfigPath
(
"audioConfig"
);
string
filePath
=
ResourcePathBuilder
.
BuildConfigPath
(
"audioConfig"
);
XmlDocument
doc
=
XMLUtil
.
getXMLFromFile
(
filePath
);
if
(
isDuplicate
(
doc
,
"audio"
,
"id"
,
resID
))
return
ResEditorErrorCode
.
DuplicateID
;
...
...
@@ -385,7 +385,7 @@ public class ResConfigManager
private
ResEditorErrorCode
updateAudioConf
(
string
fname
,
int
resID
,
float
volume
)
{
string
filePath
=
ResourcePathBuilder
.
Build
Essential
ConfigPath
(
"audioConfig"
);
string
filePath
=
ResourcePathBuilder
.
BuildConfigPath
(
"audioConfig"
);
XmlDocument
doc
=
XMLUtil
.
getXMLFromFile
(
filePath
);
if
(
isDuplicate
(
doc
,
"audio"
,
"id"
,
resID
))
return
ResEditorErrorCode
.
DuplicateID
;
...
...
@@ -469,7 +469,7 @@ public class ResConfigManager
private
static
void
initResourceConf
(
string
fileName
,
Dictionary
<
int
,
ResConfigItem
>
map
)
{
string
filePath
=
ResourcePathBuilder
.
Build
Essential
ConfigPath
(
fileName
);
string
filePath
=
ResourcePathBuilder
.
BuildConfigPath
(
fileName
);
XmlDocument
doc
=
XMLUtil
.
getXMLFromFile
(
filePath
);
XmlNodeList
nodeList
=
doc
.
GetElementsByTagName
(
"item"
);
if
(
nodeList
==
null
||
nodeList
.
Count
==
0
)
return
;
...
...
Assets/Scripts/Framework/Common/Util/XMLUtil.cs
浏览文件 @
080fc965
...
...
@@ -82,7 +82,7 @@ public class XMLUtil
try
{
#if UNITY_EDITOR
ret
=
getXMLFromFile
(
ResourcePathBuilder
.
Build
Essential
ConfigPath
(
path
));
ret
=
getXMLFromFile
(
ResourcePathBuilder
.
BuildConfigPath
(
path
));
#else
AssetBundle
ab
=
AssetBundleMgr
.
instance
.
m_normalCfgBundle
;
ret
=
getXMLFromAssetBundle
(
ab
,
path
);
...
...
@@ -104,14 +104,14 @@ public class XMLUtil
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
public
static
XmlTextReader
Get
Essential
XmlCfgByReader
(
string
path
)
public
static
XmlTextReader
GetXmlCfgByReader
(
string
path
)
{
XmlTextReader
reader
=
null
;
//GameLogger.LogNattierBlue(path);
try
{
#if UNITY_EDITOR
reader
=
GetXMLFromFile
(
ResourcePathBuilder
.
Build
Essential
ConfigPath
(
path
));
reader
=
GetXMLFromFile
(
ResourcePathBuilder
.
BuildConfigPath
(
path
));
#else
AssetBundle
ab
=
AssetBundleMgr
.
instance
.
m_normalCfgBundle
;
reader
=
GetXMLFromAssetBundle
(
ab
,
path
);
...
...
Assets/Scripts/Framework/I18N/I18N.cs
浏览文件 @
080fc965
...
...
@@ -11,7 +11,7 @@ public class I18N
{
if
(
m_isInited
)
return
;
m_i18nCfg
.
Clear
();
var
reader
=
XMLUtil
.
Get
Essential
XmlCfgByReader
(
"i18nAppStrings"
);
var
reader
=
XMLUtil
.
GetXmlCfgByReader
(
"i18nAppStrings"
);
while
(
reader
.
Read
())
{
...
...
Assets/Scripts/Framework/Resource/ResourcePathBuilder.cs
浏览文件 @
080fc965
...
...
@@ -9,7 +9,7 @@ public class ResourcePathBuilder
{
}
public
static
string
Build
Essential
ConfigPath
(
string
name
)
public
static
string
BuildConfigPath
(
string
name
)
{
#if UNITY_EDITOR
string
path
=
"Assets/GameRes/Config/"
+
name
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录