提交 72745de1 编写于 作者: 林新发's avatar 林新发

Merge branch 'master' of codechina.csdn.net:linxinfa/UnityXFramework

此差异已折叠。
此差异已折叠。
......@@ -48,7 +48,8 @@ public class ResConfigEditor : EditorWindow
if (m_curObj != m_lastObj)
{
m_lastObj = m_curObj;
m_operType = s_manager.exist(m_curObj.name) ? OperType.Update : OperType.Add;
var assetPath = AssetDatabase.GetAssetPath(m_curObj);
m_operType = s_manager.ResIsConfiged(assetPath) ? OperType.Update : OperType.Add;
string path = AssetDatabase.GetAssetPath(m_curObj);
if (!ResConfigManager.isPathRight(path)) m_errorCode = ResEditorErrorCode.PathError;
......@@ -140,8 +141,8 @@ public class ResConfigManager
{
return ResEditorErrorCode.ObjNull;
}
if (exist(obj.name)) return ResEditorErrorCode.ResExist;
var assetPath = AssetDatabase.GetAssetPath(obj);
if (ResIsConfiged(assetPath)) return ResEditorErrorCode.ResExist;
string path = AssetDatabase.GetAssetPath(obj);
if (!isPathRight(path)) return ResEditorErrorCode.PathError;
var ret = ResEditorErrorCode.Ok;
......@@ -422,11 +423,12 @@ public class ResConfigManager
return ResEditorErrorCode.Ok;
}
public bool exist(string name)
public bool ResIsConfiged(string assetPath)
{
assetPath = assetPath.Replace("Assets/GameRes/", "");
foreach (ResConfigItem item in s_itemMap1.Values)
{
if (item != null && name.Equals(item.name))
if (item != null && assetPath.Equals(item.path))
return true;
}
......
......@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
m_IndirectSpecularColor: {r: 0.37311992, g: 0.38074034, b: 0.35872713, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
......
......@@ -49,9 +49,7 @@ public class AssetBundleMgr
}
if (null != ab)
{
var assetName = fname.Substring(0, fname.IndexOf("."));
obj = ab.LoadAsset<Object>(assetName);
GameLogger.LogGreen("Load Asset From AssetBundle: assetName: " + assetName);
obj = ab.LoadAsset<Object>("Assets/GameRes/" + uri);
}
#endif
......
fileFormatVersion: 2
guid: eb289fa176a70814d87d908cda424a2c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
m_EditorVersion: 2021.1.7f1c1
m_EditorVersionWithRevision: 2021.1.7f1c1 (4e944ebb9621)
m_EditorVersion: 2021.1.9f1c1
m_EditorVersionWithRevision: 2021.1.9f1c1 (a9c352b271d7)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册