添加一些log

dev_chengFeng
jiaoyangna 2021-07-28 17:41:48 +08:00
parent 0d16b1511a
commit 957513db52
1 changed files with 24 additions and 10 deletions

View File

@ -83,24 +83,27 @@ namespace GameEditor.Util
continue;
}
dic[keyValue.Key].Add(resPath);
if (ext.Contains("tga") || ext.Contains("jpg") || ext.Contains("png") || ext.Contains("mp3") || ext.Contains("wav"))
{ }
else
if (dependDic.ContainsKey(resPath))
{
if(dependDic.ContainsKey(resPath))
for (int j = 0; j < dependDic[resPath].Count; j++)
{
for (int j = 0; j < dependDic[resPath].Count; j++)
if (!dependUnUsedDic.ContainsKey(dependDic[resPath][j]))
{
if (!dependUnUsedDic.ContainsKey(dependDic[resPath][j]))
{
dependUnUsedDic[dependDic[resPath][j]] = new List<string>();
}
dependUnUsedDic[dependDic[resPath][j]].Add(dependDic[resPath][j]);
dependUnUsedDic[dependDic[resPath][j]] = new List<string>();
}
dependUnUsedDic[dependDic[resPath][j]].Add(dependDic[resPath][j]);
}
}
}
}
//foreach (KeyValuePair<string, List<string>> keyValue in dependUnUsedDic)
//{
// Debug.Log("-------------------------------------------------------");
// for (int i = 0; i < keyValue.Value.Count; i++)
// {
// Debug.Log("keyValue.Value[i]:" + keyValue.Value[i]);
// }
//}
}
static void FindUnUsedDepend()
@ -115,21 +118,32 @@ namespace GameEditor.Util
FindUnUsedDependByPath(keyValue.Value[i]);
}
}
//foreach (KeyValuePair<string, List<string>> keyValue in dic)
//{
// Debug.Log("-------------------------------------------------------");
// for (int i = 0; i < keyValue.Value.Count; i++)
// {
// Debug.Log("keyValue.Value[i]:" + keyValue.Value[i]);
// }
//}
}
static void FindUnUsedDependByPath(string resPath)
{
//Debug.Log("-------------------------------------------------------");
if (refrenceDic.ContainsKey(resPath))
{
bool isDelete = true;
for (int i = 0; i < refrenceDic[resPath].Count; i++)
{
//Debug.Log(" refrenceDic[resPath]:"+ refrenceDic[resPath][i]);
if (!dependUnUsedDic.ContainsKey(refrenceDic[resPath][i]))
{
isDelete = false;
break;
}
}
//Debug.Log("isDelete:" + isDelete);
if (!dic.ContainsKey(resPath))
dic[resPath] = new List<string>();
if (isDelete)