diff --git a/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs b/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs index efdd1c0..b3fe009 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs @@ -26,7 +26,7 @@ namespace YooAsset private DownloaderBase _unpacker; private DownloaderBase _downloader; private AssetBundleCreateRequest _createRequest; - private FileStream _fileStream; + private Stream _stream; public AssetBundleFileLoader(AssetSystemImpl impl, BundleInfo bundleInfo) : base(impl, bundleInfo) @@ -196,12 +196,12 @@ namespace YooAsset } else if (loadMethod == EBundleLoadMethod.LoadFromStream) { - _fileStream = Impl.DecryptionServices.LoadFromStream(fileInfo); + _stream = Impl.DecryptionServices.LoadFromStream(fileInfo); uint managedReadBufferSize = Impl.DecryptionServices.GetManagedReadBufferSize(); if (_isWaitForAsyncComplete) - CacheBundle = AssetBundle.LoadFromStream(_fileStream, 0, managedReadBufferSize); + CacheBundle = AssetBundle.LoadFromStream(_stream, 0, managedReadBufferSize); else - _createRequest = AssetBundle.LoadFromStreamAsync(_fileStream, 0, managedReadBufferSize); + _createRequest = AssetBundle.LoadFromStreamAsync(_stream, 0, managedReadBufferSize); } else { @@ -265,11 +265,11 @@ namespace YooAsset { base.Destroy(forceDestroy); - if (_fileStream != null) + if (_stream != null) { - _fileStream.Close(); - _fileStream.Dispose(); - _fileStream = null; + _stream.Close(); + _stream.Dispose(); + _stream = null; } } diff --git a/Assets/YooAsset/Runtime/Services/IDecryptionServices.cs b/Assets/YooAsset/Runtime/Services/IDecryptionServices.cs index 11ea5b0..52e8fd9 100644 --- a/Assets/YooAsset/Runtime/Services/IDecryptionServices.cs +++ b/Assets/YooAsset/Runtime/Services/IDecryptionServices.cs @@ -32,7 +32,7 @@ namespace YooAsset /// /// 文件流解密方法 /// - System.IO.FileStream LoadFromStream(DecryptFileInfo fileInfo); + System.IO.Stream LoadFromStream(DecryptFileInfo fileInfo); /// /// 文件流解密的托管缓存大小