mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-28 11:38:47 +00:00
@@ -8,7 +8,7 @@ namespace YooAsset
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
internal class DefaultEditorFileSystem : IFileSystem
|
internal class DefaultEditorFileSystem : IFileSystem
|
||||||
{
|
{
|
||||||
protected readonly HashSet<string> _records = new HashSet<string>();
|
protected readonly Dictionary<string, string> _records = new Dictionary<string, string>(10000);
|
||||||
protected string _packageRoot;
|
protected string _packageRoot;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -149,7 +149,7 @@ namespace YooAsset
|
|||||||
{
|
{
|
||||||
if (VirtualDownloadMode)
|
if (VirtualDownloadMode)
|
||||||
{
|
{
|
||||||
return _records.Contains(bundle.BundleGUID);
|
return _records.ContainsKey(bundle.BundleGUID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -198,10 +198,10 @@ namespace YooAsset
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region 内部方法
|
#region 内部方法
|
||||||
public void RecordDownloadFile(string bundleName)
|
public void RecordDownloadFile(PackageBundle bundle)
|
||||||
{
|
{
|
||||||
if (_records.Contains(bundleName) == false)
|
if (_records.ContainsKey(bundle.BundleGUID) == false)
|
||||||
_records.Add(bundleName);
|
_records.Add(bundle.BundleGUID, bundle.BundleName);
|
||||||
}
|
}
|
||||||
public string GetEditorPackageVersionFilePath()
|
public string GetEditorPackageVersionFilePath()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ namespace YooAsset
|
|||||||
|
|
||||||
if (_unityDownloadFileOp.Status == EOperationStatus.Succeed)
|
if (_unityDownloadFileOp.Status == EOperationStatus.Succeed)
|
||||||
{
|
{
|
||||||
_fileSystem.RecordDownloadFile(Bundle.BundleName);
|
_fileSystem.RecordDownloadFile(Bundle);
|
||||||
_steps = ESteps.Done;
|
_steps = ESteps.Done;
|
||||||
Status = EOperationStatus.Succeed;
|
Status = EOperationStatus.Succeed;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user