mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-17 13:20:20 +00:00
style : code style
This commit is contained in:
@@ -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>();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user