update 添加一个方法,获取还没下载的带tag原生文件的列表

mlyDev
Nocye 2023-06-22 20:04:23 +08:00
parent fa111f8d93
commit 79a9763555
5 changed files with 51 additions and 0 deletions

View File

@ -138,6 +138,11 @@ namespace YooAsset
return result;
}
public List<PackageBundle> GetNeedDownloadTagsRawFiles(string[] tags)
{
return new List<PackageBundle>();
}
#endregion
}
}

View File

@ -377,6 +377,33 @@ namespace YooAsset
return result;
}
public List<PackageBundle> GetNeedDownloadTagsRawFiles(string[] tags)
{
List<PackageBundle> neetDownloadList = new List<PackageBundle>(200);
foreach (PackageBundle bundle in _activeManifest.BundleList)
{
if (IsCachedPackageBundle(bundle))
{
continue;
}
if (IsBuildinPackageBundle(bundle))
{
continue;
}
if (!bundle.HasAnyTags())
{
continue;
}
bundle.HasTag(tags);
neetDownloadList.Add(bundle);
}
return neetDownloadList;
}
#endregion
}
}

View File

@ -139,6 +139,11 @@ namespace YooAsset
return new List<PackageBundle>();
}
public List<PackageBundle> GetNeedDownloadTagsRawFiles(string[] tags)
{
return new List<PackageBundle>();
}
#endregion
}
}

View File

@ -866,6 +866,19 @@ namespace YooAsset
OperationSystem.StartOperation(operation);
return operation;
}
public long GetNeedDownloadTagsRawFileSize(string[] tags)
{
DebugCheckInitialize();
var list=_playModeServices.GetNeedDownloadTagsRawFiles(tags);
long size = 0;
foreach (PackageBundle packageBundle in list)
{
size += packageBundle.FileSize;
}
return size;
}
#endregion
}
}

View File

@ -40,5 +40,6 @@ namespace YooAsset
ResourceUnpackerOperation CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout);
List<PackageBundle> GetCachedTagsRawFiles(string[] tags);
List<PackageBundle> GetNeedDownloadTagsRawFiles(string[] tags);
}
}