style : code style

This commit is contained in:
何冠峰
2025-06-30 10:53:16 +08:00
parent a13913f572
commit 40c82835bf
2 changed files with 6 additions and 11 deletions

View File

@@ -177,9 +177,6 @@ namespace YooAsset.Editor
/// </summary>
public string[] GetDependencies(string assetPath, bool recursive)
{
// 注意AssetDatabase.GetDependencies()方法返回结果里会踢出丢失文件!
// 注意AssetDatabase.GetDependencies()方法返回结果里会包含主资源路径!
// 注意:机制上不允许存在未收录的资源
if (_database.ContainsKey(assetPath) == false)
{
@@ -187,17 +184,14 @@ namespace YooAsset.Editor
}
var result = new HashSet<string>();
// 递归收集依赖时,依赖列表中包含主资源
// 注意:递归收集依赖时,依赖列表中包含主资源
if (recursive)
{
result.Add(assetPath);
}
// 收集依赖
CollectDependencies(assetPath, assetPath, result, recursive);
// 注意AssetDatabase.GetDependencies保持一致将主资源添加到依赖列表最前面
return result.ToArray();
}
private void CollectDependencies(string parent, string assetPath, HashSet<string> result, bool recursive)
@@ -263,6 +257,7 @@ namespace YooAsset.Editor
}
private DependencyInfo CreateDependencyInfo(string assetPath)
{
// 注意AssetDatabase.GetDependencies()方法返回结果里会踢出丢失文件!
var dependHash = AssetDatabase.GetAssetDependencyHash(assetPath);
var dependAssetPaths = AssetDatabase.GetDependencies(assetPath, false);
var dependGUIDs = new List<string>();

View File

@@ -114,13 +114,13 @@ namespace YooAsset
}
else
{
Error = $"Failed copy buildin bundle : {_requestURL}";
Error = $"Failed copy local file : {_requestURL}";
_steps = ESteps.TryAgain;
}
}
catch (System.Exception ex)
{
Error = $"Failed copy buildin bundle : {ex.Message}";
Error = $"Failed copy local file : {ex.Message}";
_steps = ESteps.TryAgain;
}
}