From 02d70a476d095114bd602df258e59cf9ab61c094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=86=A0=E5=B3=B0?= Date: Thu, 4 Jul 2024 22:55:58 +0800 Subject: [PATCH] update file system --- .../Operation/DCFSLoadBundleOperation.cs | 4 ---- .../DefaultWebFileSystem/Operation/DWFSLoadBundleOperation.cs | 2 -- .../Operation/Internal/FSLoadBundleFileOperation.cs | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/DCFSLoadBundleOperation.cs b/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/DCFSLoadBundleOperation.cs index 6d6e62b..4942313 100644 --- a/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/DCFSLoadBundleOperation.cs +++ b/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/DCFSLoadBundleOperation.cs @@ -31,8 +31,6 @@ namespace YooAsset { if (_fileSystem.CheckNeedDownload(_bundle)) { - DownloadProgress = 0f; - DownloadedBytes = 0; _steps = ESteps.DownloadFile; } else @@ -219,8 +217,6 @@ namespace YooAsset { if (_fileSystem.CheckNeedDownload(_bundle)) { - DownloadProgress = 0f; - DownloadedBytes = 0; _steps = ESteps.DownloadFile; } else diff --git a/Assets/YooAsset/Runtime/FileSystem/DefaultWebFileSystem/Operation/DWFSLoadBundleOperation.cs b/Assets/YooAsset/Runtime/FileSystem/DefaultWebFileSystem/Operation/DWFSLoadBundleOperation.cs index 1313863..2ee6c2b 100644 --- a/Assets/YooAsset/Runtime/FileSystem/DefaultWebFileSystem/Operation/DWFSLoadBundleOperation.cs +++ b/Assets/YooAsset/Runtime/FileSystem/DefaultWebFileSystem/Operation/DWFSLoadBundleOperation.cs @@ -24,8 +24,6 @@ namespace YooAsset } internal override void InternalOnStart() { - DownloadProgress = 0f; - DownloadedBytes = 0; _steps = ESteps.DownloadFile; } internal override void InternalOnUpdate() diff --git a/Assets/YooAsset/Runtime/FileSystem/Operation/Internal/FSLoadBundleFileOperation.cs b/Assets/YooAsset/Runtime/FileSystem/Operation/Internal/FSLoadBundleFileOperation.cs index 6313396..ccd6e07 100644 --- a/Assets/YooAsset/Runtime/FileSystem/Operation/Internal/FSLoadBundleFileOperation.cs +++ b/Assets/YooAsset/Runtime/FileSystem/Operation/Internal/FSLoadBundleFileOperation.cs @@ -12,12 +12,12 @@ namespace YooAsset /// /// 下载进度 /// - public float DownloadProgress { protected set; get; } + public float DownloadProgress { protected set; get; } = 0; /// /// 下载大小 /// - public long DownloadedBytes { protected set; get; } + public long DownloadedBytes { protected set; get; } = 0; /// /// 终止下载任务