update 添加一个方法,获取还没下载的带tag原生文件的列表
parent
fa111f8d93
commit
79a9763555
|
@ -138,6 +138,11 @@ namespace YooAsset
|
|||
return result;
|
||||
}
|
||||
|
||||
public List<PackageBundle> GetNeedDownloadTagsRawFiles(string[] tags)
|
||||
{
|
||||
return new List<PackageBundle>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -139,6 +139,11 @@ namespace YooAsset
|
|||
return new List<PackageBundle>();
|
||||
}
|
||||
|
||||
public List<PackageBundle> GetNeedDownloadTagsRawFiles(string[] tags)
|
||||
{
|
||||
return new List<PackageBundle>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue