mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-24 01:30:14 +00:00
style : code style
This commit is contained in:
@@ -177,9 +177,6 @@ namespace YooAsset.Editor
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string[] GetDependencies(string assetPath, bool recursive)
|
public string[] GetDependencies(string assetPath, bool recursive)
|
||||||
{
|
{
|
||||||
// 注意:AssetDatabase.GetDependencies()方法返回结果里会踢出丢失文件!
|
|
||||||
// 注意:AssetDatabase.GetDependencies()方法返回结果里会包含主资源路径!
|
|
||||||
|
|
||||||
// 注意:机制上不允许存在未收录的资源
|
// 注意:机制上不允许存在未收录的资源
|
||||||
if (_database.ContainsKey(assetPath) == false)
|
if (_database.ContainsKey(assetPath) == false)
|
||||||
{
|
{
|
||||||
@@ -188,16 +185,13 @@ namespace YooAsset.Editor
|
|||||||
|
|
||||||
var result = new HashSet<string>();
|
var result = new HashSet<string>();
|
||||||
|
|
||||||
// 递归收集依赖时,依赖列表中包含主资源
|
// 注意:递归收集依赖时,依赖列表中包含主资源
|
||||||
if (recursive)
|
if (recursive)
|
||||||
{
|
|
||||||
result.Add(assetPath);
|
result.Add(assetPath);
|
||||||
}
|
|
||||||
|
|
||||||
// 收集依赖
|
// 收集依赖
|
||||||
CollectDependencies(assetPath, assetPath, result, recursive);
|
CollectDependencies(assetPath, assetPath, result, recursive);
|
||||||
|
|
||||||
// 注意:AssetDatabase.GetDependencies保持一致,将主资源添加到依赖列表最前面
|
|
||||||
return result.ToArray();
|
return result.ToArray();
|
||||||
}
|
}
|
||||||
private void CollectDependencies(string parent, string assetPath, HashSet<string> result, bool recursive)
|
private void CollectDependencies(string parent, string assetPath, HashSet<string> result, bool recursive)
|
||||||
@@ -263,6 +257,7 @@ namespace YooAsset.Editor
|
|||||||
}
|
}
|
||||||
private DependencyInfo CreateDependencyInfo(string assetPath)
|
private DependencyInfo CreateDependencyInfo(string assetPath)
|
||||||
{
|
{
|
||||||
|
// 注意:AssetDatabase.GetDependencies()方法返回结果里会踢出丢失文件!
|
||||||
var dependHash = AssetDatabase.GetAssetDependencyHash(assetPath);
|
var dependHash = AssetDatabase.GetAssetDependencyHash(assetPath);
|
||||||
var dependAssetPaths = AssetDatabase.GetDependencies(assetPath, false);
|
var dependAssetPaths = AssetDatabase.GetDependencies(assetPath, false);
|
||||||
var dependGUIDs = new List<string>();
|
var dependGUIDs = new List<string>();
|
||||||
|
|||||||
@@ -114,13 +114,13 @@ namespace YooAsset
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Error = $"Failed copy buildin bundle : {_requestURL}";
|
Error = $"Failed copy local file : {_requestURL}";
|
||||||
_steps = ESteps.TryAgain;
|
_steps = ESteps.TryAgain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (System.Exception ex)
|
catch (System.Exception ex)
|
||||||
{
|
{
|
||||||
Error = $"Failed copy buildin bundle : {ex.Message}";
|
Error = $"Failed copy local file : {ex.Message}";
|
||||||
_steps = ESteps.TryAgain;
|
_steps = ESteps.TryAgain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user