From 15ce6b8c8c3279b6950f93ca9d11677e87ff84d4 Mon Sep 17 00:00:00 2001 From: hevinci Date: Wed, 19 Jul 2023 14:34:43 +0800 Subject: [PATCH] update runtime code --- .../PlayMode/HostPlayModeImpl.cs | 19 ++++++++++--------- .../PlayMode/OfflinePlayModeImpl.cs | 11 ++++++----- .../PackageSystem/PlayMode/WebPlayModeImpl.cs | 11 ++++++----- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/HostPlayModeImpl.cs b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/HostPlayModeImpl.cs index d0c1474..cfe0978 100644 --- a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/HostPlayModeImpl.cs +++ b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/HostPlayModeImpl.cs @@ -51,6 +51,16 @@ namespace YooAsset return bundleInfo; } + // 查询相关 + private bool IsBuildinPackageBundle(PackageBundle packageBundle) + { + return _queryServices.QueryStreamingAssets(_packageName, packageBundle.FileName); + } + private bool IsCachedPackageBundle(PackageBundle packageBundle) + { + return CacheSystem.IsCached(packageBundle.PackageName, packageBundle.CacheGUID); + } + #region IPlayModeServices接口 public PackageManifest ActiveManifest { @@ -71,15 +81,6 @@ namespace YooAsset } } - private bool IsBuildinPackageBundle(PackageBundle packageBundle) - { - return _queryServices.QueryStreamingAssets(_packageName, packageBundle.FileName); - } - private bool IsCachedPackageBundle(PackageBundle packageBundle) - { - return CacheSystem.IsCached(packageBundle.PackageName, packageBundle.CacheGUID); - } - UpdatePackageVersionOperation IPlayModeServices.UpdatePackageVersionAsync(bool appendTimeTicks, int timeout) { var operation = new HostPlayModeUpdatePackageVersionOperation(this, _packageName, appendTimeTicks, timeout); diff --git a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/OfflinePlayModeImpl.cs b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/OfflinePlayModeImpl.cs index f85fb10..fc2cdb3 100644 --- a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/OfflinePlayModeImpl.cs +++ b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/OfflinePlayModeImpl.cs @@ -18,6 +18,12 @@ namespace YooAsset return operation; } + // 查询相关 + private bool IsCachedPackageBundle(PackageBundle packageBundle) + { + return CacheSystem.IsCached(packageBundle.PackageName, packageBundle.CacheGUID); + } + #region IPlayModeServices接口 public PackageManifest ActiveManifest { @@ -34,11 +40,6 @@ namespace YooAsset { } - private bool IsCachedPackageBundle(PackageBundle packageBundle) - { - return CacheSystem.IsCached(packageBundle.PackageName, packageBundle.CacheGUID); - } - UpdatePackageVersionOperation IPlayModeServices.UpdatePackageVersionAsync(bool appendTimeTicks, int timeout) { var operation = new OfflinePlayModeUpdatePackageVersionOperation(); diff --git a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/WebPlayModeImpl.cs b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/WebPlayModeImpl.cs index cd07354..2b14e44 100644 --- a/Assets/YooAsset/Runtime/PackageSystem/PlayMode/WebPlayModeImpl.cs +++ b/Assets/YooAsset/Runtime/PackageSystem/PlayMode/WebPlayModeImpl.cs @@ -41,6 +41,12 @@ namespace YooAsset return bundleInfo; } + // 查询相关 + private bool IsBuildinPackageBundle(PackageBundle packageBundle) + { + return _queryServices.QueryStreamingAssets(_packageName, packageBundle.FileName); + } + #region IPlayModeServices接口 public PackageManifest ActiveManifest { @@ -57,11 +63,6 @@ namespace YooAsset { } - private bool IsBuildinPackageBundle(PackageBundle packageBundle) - { - return _queryServices.QueryStreamingAssets(_packageName, packageBundle.FileName); - } - UpdatePackageVersionOperation IPlayModeServices.UpdatePackageVersionAsync(bool appendTimeTicks, int timeout) { var operation = new WebPlayModeUpdatePackageVersionOperation(this, _packageName, appendTimeTicks, timeout);