diff --git a/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs b/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs index b1fdef6..4bcab85 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/AssetSystem.cs @@ -13,6 +13,7 @@ namespace YooAsset private readonly static Dictionary _sceneHandles = new Dictionary(100); private static long _sceneCreateCount = 0; + private string _packageName; private bool _simulationOnEditor; private int _loadingMaxNumber; public IDecryptionServices DecryptionServices { private set; get; } @@ -23,8 +24,9 @@ namespace YooAsset /// 初始化 /// 注意:在使用AssetSystem之前需要初始化 /// - public void Initialize(bool simulationOnEditor, int loadingMaxNumber, IDecryptionServices decryptionServices, IBundleServices bundleServices) + public void Initialize(string packageName, bool simulationOnEditor, int loadingMaxNumber, IDecryptionServices decryptionServices, IBundleServices bundleServices) { + _packageName = packageName; _simulationOnEditor = simulationOnEditor; _loadingMaxNumber = loadingMaxNumber; DecryptionServices = decryptionServices; @@ -184,7 +186,7 @@ namespace YooAsset } var handle = provider.CreateHandle(); - handle.PackageName = BundleServices.GetPackageName(); + handle.PackageName = _packageName; _sceneHandles.Add(providerGUID, handle); return handle; } @@ -300,7 +302,7 @@ namespace YooAsset // 释放资源包下的所有场景 if (BundleServices.IsServicesValid()) { - string packageName = BundleServices.GetPackageName(); + string packageName = _packageName; List removeList = new List(); foreach (var valuePair in _sceneHandles) { diff --git a/Assets/YooAsset/Runtime/AssetsPackage.cs b/Assets/YooAsset/Runtime/AssetsPackage.cs index f456fc2..083651e 100644 --- a/Assets/YooAsset/Runtime/AssetsPackage.cs +++ b/Assets/YooAsset/Runtime/AssetsPackage.cs @@ -87,7 +87,7 @@ namespace YooAsset var editorSimulateModeImpl = new EditorSimulateModeImpl(); _bundleServices = editorSimulateModeImpl; _playModeServices = editorSimulateModeImpl; - _assetSystemImpl.Initialize(true, parameters.AssetLoadingMaxNumber, parameters.DecryptionServices, _bundleServices); + _assetSystemImpl.Initialize(PackageName, true, parameters.AssetLoadingMaxNumber, parameters.DecryptionServices, _bundleServices); var initializeParameters = parameters as EditorSimulateModeParameters; initializeOperation = editorSimulateModeImpl.InitializeAsync(PackageName, initializeParameters.LocationToLower, initializeParameters.SimulatePatchManifestPath); @@ -97,7 +97,7 @@ namespace YooAsset var offlinePlayModeImpl = new OfflinePlayModeImpl(); _bundleServices = offlinePlayModeImpl; _playModeServices = offlinePlayModeImpl; - _assetSystemImpl.Initialize(false, parameters.AssetLoadingMaxNumber, parameters.DecryptionServices, _bundleServices); + _assetSystemImpl.Initialize(PackageName, false, parameters.AssetLoadingMaxNumber, parameters.DecryptionServices, _bundleServices); var initializeParameters = parameters as OfflinePlayModeParameters; initializeOperation = offlinePlayModeImpl.InitializeAsync(PackageName, initializeParameters.LocationToLower); @@ -107,7 +107,7 @@ namespace YooAsset var hostPlayModeImpl = new HostPlayModeImpl(); _bundleServices = hostPlayModeImpl; _playModeServices = hostPlayModeImpl; - _assetSystemImpl.Initialize(false, parameters.AssetLoadingMaxNumber, parameters.DecryptionServices, _bundleServices); + _assetSystemImpl.Initialize(PackageName, false, parameters.AssetLoadingMaxNumber, parameters.DecryptionServices, _bundleServices); var initializeParameters = parameters as HostPlayModeParameters; initializeOperation = hostPlayModeImpl.InitializeAsync( @@ -319,7 +319,7 @@ namespace YooAsset { DebugCheckInitialize(); string[] tags = new string[] { tag }; - return _bundleServices.GetAssetInfos(tags); + return _playModeServices.ActiveManifest.GetAssetsInfoByTags(tags); } /// @@ -329,7 +329,7 @@ namespace YooAsset public AssetInfo[] GetAssetInfos(string[] tags) { DebugCheckInitialize(); - return _bundleServices.GetAssetInfos(tags); + return _playModeServices.ActiveManifest.GetAssetsInfoByTags(tags); } /// @@ -350,7 +350,7 @@ namespace YooAsset public bool CheckLocationValid(string location) { DebugCheckInitialize(); - string assetPath = _bundleServices.TryMappingToAssetPath(location); + string assetPath = _playModeServices.ActiveManifest.TryMappingToAssetPath(location); return string.IsNullOrEmpty(assetPath) == false; } #endregion @@ -725,7 +725,15 @@ namespace YooAsset // NOTE : 编辑器模拟模式下始终返回TRUE if (_playMode == EPlayMode.EditorSimulateMode) return true; - return _bundleServices.IsIncludeBundleFile(fileName); + return _playModeServices.ActiveManifest.IsIncludeBundleFile(fileName); + } + + /// + /// 资源定位地址转换为资源信息类 + /// + private AssetInfo ConvertLocationToAssetInfo(string location, System.Type assetType) + { + return _playModeServices.ActiveManifest.ConvertLocationToAssetInfo(location, assetType); } #endregion @@ -739,24 +747,6 @@ namespace YooAsset throw new Exception($"Package initialize failed ! {_initializeError}"); } - [Conditional("DEBUG")] - private void DebugCheckLocation(string location) - { - if (string.IsNullOrEmpty(location) == false) - { - // 检查路径末尾是否有空格 - int index = location.LastIndexOf(" "); - if (index != -1) - { - if (location.Length == index + 1) - YooLogger.Warning($"Found blank character in location : \"{location}\""); - } - - if (location.IndexOfAny(System.IO.Path.GetInvalidPathChars()) >= 0) - YooLogger.Warning($"Found illegal character in location : \"{location}\""); - } - } - [Conditional("DEBUG")] private void DebugCheckUpdateManifest() { @@ -777,33 +767,5 @@ namespace YooAsset return data; } #endregion - - #region 私有方法 - /// - /// 资源定位地址转换为资源信息类,失败时内部会发出错误日志。 - /// - /// 如果转换失败会返回一个无效的资源信息类 - private AssetInfo ConvertLocationToAssetInfo(string location, System.Type assetType) - { - DebugCheckLocation(location); - string assetPath = _bundleServices.MappingToAssetPath(location); - PatchAsset patchAsset = _bundleServices.TryGetPatchAsset(assetPath); - if (patchAsset != null) - { - AssetInfo assetInfo = new AssetInfo(patchAsset, assetType); - return assetInfo; - } - else - { - string error; - if (string.IsNullOrEmpty(location)) - error = $"The location is null or empty !"; - else - error = $"The location is invalid : {location}"; - AssetInfo assetInfo = new AssetInfo(error); - return assetInfo; - } - } - #endregion } } \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/PatchSystem/Operations/PreDownloadPackageOperation.cs b/Assets/YooAsset/Runtime/PatchSystem/Operations/PreDownloadPackageOperation.cs new file mode 100644 index 0000000..f652e8c --- /dev/null +++ b/Assets/YooAsset/Runtime/PatchSystem/Operations/PreDownloadPackageOperation.cs @@ -0,0 +1,263 @@ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace YooAsset +{ + public abstract class PreDownloadPackageOperation : AsyncOperationBase + { + /// + /// 创建补丁下载器,用于下载更新指定资源版本所有的资源包文件 + /// + /// 同时下载的最大文件数 + /// 下载失败的重试次数 + /// 超时时间 + public virtual PatchDownloaderOperation CreatePatchDownloader(int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + { + return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout); + } + + /// + /// 创建补丁下载器,用于下载更新资源标签指定的资源包文件 + /// + /// 资源标签 + /// 同时下载的最大文件数 + /// 下载失败的重试次数 + /// 超时时间 + public virtual PatchDownloaderOperation CreatePatchDownloader(string tag, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + { + return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout); + } + + /// + /// 创建补丁下载器,用于下载更新资源标签指定的资源包文件 + /// + /// 资源标签列表 + /// 同时下载的最大文件数 + /// 下载失败的重试次数 + /// 超时时间 + public virtual PatchDownloaderOperation CreatePatchDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + { + return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout); + } + + /// + /// 创建补丁下载器,用于下载更新指定的资源列表依赖的资源包文件 + /// + /// 资源定位列表 + /// 同时下载的最大文件数 + /// 下载失败的重试次数 + /// 超时时间 + public virtual PatchDownloaderOperation CreateBundleDownloader(string[] locations, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + { + return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout); + } + } + + public class EditorPlayModePreDownloadPackageOperation : PreDownloadPackageOperation + { + internal override void Start() + { + Status = EOperationStatus.Succeed; + } + internal override void Update() + { + } + } + + public class OfflinePlayModePreDownloadPackageOperation : PreDownloadPackageOperation + { + internal override void Start() + { + Status = EOperationStatus.Succeed; + } + internal override void Update() + { + } + } + + public class HostPlayModePreDownloadPackageOperation : PreDownloadPackageOperation + { + private enum ESteps + { + None, + CheckActiveManifest, + TryLoadCacheManifest, + DownloadManifest, + LoadCacheManifest, + CheckDeserializeManifest, + Done, + } + + private readonly HostPlayModeImpl _impl; + private readonly string _packageName; + private readonly string _packageVersion; + private readonly int _timeout; + private LoadCacheManifestOperation _tryLoadCacheManifestOp; + private LoadCacheManifestOperation _loadCacheManifestOp; + private DownloadManifestOperation _downloadManifestOp; + private PatchManifest _manifest; + private ESteps _steps = ESteps.None; + + + internal HostPlayModePreDownloadPackageOperation(HostPlayModeImpl impl, string packageName, string packageVersion, int timeout) + { + _impl = impl; + _packageName = packageName; + _packageVersion = packageVersion; + _timeout = timeout; + } + internal override void Start() + { + _steps = ESteps.CheckActiveManifest; + } + internal override void Update() + { + if (_steps == ESteps.None || _steps == ESteps.Done) + return; + + if (_steps == ESteps.CheckActiveManifest) + { + // 检测当前激活的清单对象 + if (_impl.ActiveManifest != null) + { + if (_impl.ActiveManifest.PackageVersion == _packageVersion) + { + _manifest = _impl.ActiveManifest; + _steps = ESteps.Done; + Status = EOperationStatus.Succeed; + return; + } + } + _steps = ESteps.TryLoadCacheManifest; + } + + if (_steps == ESteps.TryLoadCacheManifest) + { + if (_tryLoadCacheManifestOp == null) + { + _tryLoadCacheManifestOp = new LoadCacheManifestOperation(_packageName, _packageVersion); + OperationSystem.StartOperation(_tryLoadCacheManifestOp); + } + + if (_tryLoadCacheManifestOp.IsDone == false) + return; + + if (_tryLoadCacheManifestOp.Status == EOperationStatus.Succeed) + { + _manifest = _tryLoadCacheManifestOp.Manifest; + _steps = ESteps.Done; + Status = EOperationStatus.Succeed; + } + else + { + _steps = ESteps.DownloadManifest; + } + } + + if (_steps == ESteps.DownloadManifest) + { + if (_downloadManifestOp == null) + { + _downloadManifestOp = new DownloadManifestOperation(_impl, _packageName, _packageVersion, _timeout); + OperationSystem.StartOperation(_downloadManifestOp); + } + + if (_downloadManifestOp.IsDone == false) + return; + + if (_downloadManifestOp.Status == EOperationStatus.Succeed) + { + _steps = ESteps.LoadCacheManifest; + } + else + { + _steps = ESteps.Done; + Status = EOperationStatus.Failed; + Error = _downloadManifestOp.Error; + } + } + + if (_steps == ESteps.LoadCacheManifest) + { + if (_loadCacheManifestOp == null) + { + _loadCacheManifestOp = new LoadCacheManifestOperation(_packageName, _packageVersion); + OperationSystem.StartOperation(_loadCacheManifestOp); + } + + if (_loadCacheManifestOp.IsDone == false) + return; + + if (_loadCacheManifestOp.Status == EOperationStatus.Succeed) + { + _manifest = _loadCacheManifestOp.Manifest; + _steps = ESteps.Done; + Status = EOperationStatus.Succeed; + } + else + { + _steps = ESteps.Done; + Status = EOperationStatus.Failed; + Error = _loadCacheManifestOp.Error; + } + } + } + + public override PatchDownloaderOperation CreatePatchDownloader(int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + { + if (Status != EOperationStatus.Succeed) + { + YooLogger.Warning($"{nameof(PreDownloadPackageOperation)} status is not succeed !"); + return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout); + } + + List downloadList = _impl.GetDownloadListByAll(_manifest); + var operation = new PatchDownloaderOperation(downloadList, downloadingMaxNumber, failedTryAgain, timeout); + return operation; + } + public override PatchDownloaderOperation CreatePatchDownloader(string tag, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + { + if (Status != EOperationStatus.Succeed) + { + YooLogger.Warning($"{nameof(PreDownloadPackageOperation)} status is not succeed !"); + return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout); + } + + List downloadList = _impl.GetDownloadListByTags(_manifest, new string[] { tag }); + var operation = new PatchDownloaderOperation(downloadList, downloadingMaxNumber, failedTryAgain, timeout); + return operation; + } + public override PatchDownloaderOperation CreatePatchDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + { + if (Status != EOperationStatus.Succeed) + { + YooLogger.Warning($"{nameof(PreDownloadPackageOperation)} status is not succeed !"); + return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout); + } + + List downloadList = _impl.GetDownloadListByTags(_manifest, tags); + var operation = new PatchDownloaderOperation(downloadList, downloadingMaxNumber, failedTryAgain, timeout); + return operation; + } + public override PatchDownloaderOperation CreateBundleDownloader(string[] locations, int downloadingMaxNumber, int failedTryAgain, int timeout = 60) + { + if (Status != EOperationStatus.Succeed) + { + YooLogger.Warning($"{nameof(PreDownloadPackageOperation)} status is not succeed !"); + return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout); + } + + List assetInfos = new List(locations.Length); + foreach (var location in locations) + { + var assetInfo = _manifest.ConvertLocationToAssetInfo(location, null); + assetInfos.Add(assetInfo); + } + + List downloadList = _impl.GetDownloadListByPaths(_manifest, assetInfos.ToArray()); + var operation = new PatchDownloaderOperation(downloadList, downloadingMaxNumber, failedTryAgain, timeout); + return operation; + } + } +} \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/PatchSystem/Operations/PreDownloadPackageOperation.cs.meta b/Assets/YooAsset/Runtime/PatchSystem/Operations/PreDownloadPackageOperation.cs.meta new file mode 100644 index 0000000..5b1c538 --- /dev/null +++ b/Assets/YooAsset/Runtime/PatchSystem/Operations/PreDownloadPackageOperation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 51f7a5e97aff1a646972c4ea11612947 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageManifestOperation.cs b/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageManifestOperation.cs index 33246d8..ebffa48 100644 --- a/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageManifestOperation.cs +++ b/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageManifestOperation.cs @@ -1,7 +1,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.IO; namespace YooAsset { diff --git a/Assets/YooAsset/Runtime/PatchSystem/PatchManifest.cs b/Assets/YooAsset/Runtime/PatchSystem/PatchManifest.cs index 7a45850..cf62ae8 100644 --- a/Assets/YooAsset/Runtime/PatchSystem/PatchManifest.cs +++ b/Assets/YooAsset/Runtime/PatchSystem/PatchManifest.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Diagnostics; using System.Collections; using System.Collections.Generic; @@ -265,6 +266,31 @@ namespace YooAsset return result.ToArray(); } + /// + /// 资源定位地址转换为资源信息类,失败时内部会发出错误日志。 + /// + /// 如果转换失败会返回一个无效的资源信息类 + public AssetInfo ConvertLocationToAssetInfo(string location, System.Type assetType) + { + DebugCheckLocation(location); + + string assetPath = MappingToAssetPath(location); + if (TryGetPatchAsset(assetPath, out PatchAsset patchAsset)) + { + AssetInfo assetInfo = new AssetInfo(patchAsset, assetType); + return assetInfo; + } + else + { + string error; + if (string.IsNullOrEmpty(location)) + error = $"The location is null or empty !"; + else + error = $"The location is invalid : {location}"; + AssetInfo assetInfo = new AssetInfo(error); + return assetInfo; + } + } /// /// 生成Bundle文件的正式名称 @@ -291,5 +317,25 @@ namespace YooAsset throw new NotImplementedException($"Invalid name style : {nameStyle}"); } } + + #region 调试方法 + [Conditional("DEBUG")] + private void DebugCheckLocation(string location) + { + if (string.IsNullOrEmpty(location) == false) + { + // 检查路径末尾是否有空格 + int index = location.LastIndexOf(" "); + if (index != -1) + { + if (location.Length == index + 1) + YooLogger.Warning($"Found blank character in location : \"{location}\""); + } + + if (location.IndexOfAny(System.IO.Path.GetInvalidPathChars()) >= 0) + YooLogger.Warning($"Found illegal character in location : \"{location}\""); + } + } + #endregion } } \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/EditorSimulateModeImpl.cs b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/EditorSimulateModeImpl.cs index 63286a7..97bee8c 100644 --- a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/EditorSimulateModeImpl.cs +++ b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/EditorSimulateModeImpl.cs @@ -58,7 +58,7 @@ namespace YooAsset OperationSystem.StartOperation(operation); return operation; } - + PatchDownloaderOperation IPlayModeServices.CreatePatchDownloaderByAll(int downloadingMaxNumber, int failedTryAgain, int timeout) { return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout); @@ -97,33 +97,6 @@ namespace YooAsset { throw new NotImplementedException(); } - AssetInfo[] IBundleServices.GetAssetInfos(string[] tags) - { - return _activeManifest.GetAssetsInfoByTags(tags); - } - PatchAsset IBundleServices.TryGetPatchAsset(string assetPath) - { - if (_activeManifest.TryGetPatchAsset(assetPath, out PatchAsset patchAsset)) - return patchAsset; - else - return null; - } - string IBundleServices.MappingToAssetPath(string location) - { - return _activeManifest.MappingToAssetPath(location); - } - string IBundleServices.TryMappingToAssetPath(string location) - { - return _activeManifest.TryMappingToAssetPath(location); - } - string IBundleServices.GetPackageName() - { - return _packageName; - } - bool IBundleServices.IsIncludeBundleFile(string fileName) - { - return _activeManifest.IsIncludeBundleFile(fileName); - } bool IBundleServices.IsServicesValid() { return _activeManifest != null; diff --git a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/HostPlayModeImpl.cs b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/HostPlayModeImpl.cs index c6061c0..de211c5 100644 --- a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/HostPlayModeImpl.cs +++ b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/HostPlayModeImpl.cs @@ -185,7 +185,7 @@ namespace YooAsset var operation = new PatchDownloaderOperation(downloadList, downloadingMaxNumber, failedTryAgain, timeout); return operation; } - private List GetDownloadListByPaths(PatchManifest patchManifest, AssetInfo[] assetInfos) + public List GetDownloadListByPaths(PatchManifest patchManifest, AssetInfo[] assetInfos) { // 获取资源对象的资源包和所有依赖资源包 List checkList = new List(); @@ -328,33 +328,6 @@ namespace YooAsset } return result.ToArray(); } - AssetInfo[] IBundleServices.GetAssetInfos(string[] tags) - { - return _activeManifest.GetAssetsInfoByTags(tags); - } - PatchAsset IBundleServices.TryGetPatchAsset(string assetPath) - { - if (_activeManifest.TryGetPatchAsset(assetPath, out PatchAsset patchAsset)) - return patchAsset; - else - return null; - } - string IBundleServices.MappingToAssetPath(string location) - { - return _activeManifest.MappingToAssetPath(location); - } - string IBundleServices.TryMappingToAssetPath(string location) - { - return _activeManifest.TryMappingToAssetPath(location); - } - string IBundleServices.GetPackageName() - { - return _packageName; - } - bool IBundleServices.IsIncludeBundleFile(string fileName) - { - return _activeManifest.IsIncludeBundleFile(fileName); - } bool IBundleServices.IsServicesValid() { return _activeManifest != null; diff --git a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/OfflinePlayModeImpl.cs b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/OfflinePlayModeImpl.cs index 76d72d2..a437700 100644 --- a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/OfflinePlayModeImpl.cs +++ b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/OfflinePlayModeImpl.cs @@ -125,33 +125,6 @@ namespace YooAsset } return result.ToArray(); } - AssetInfo[] IBundleServices.GetAssetInfos(string[] tags) - { - return _activeManifest.GetAssetsInfoByTags(tags); - } - PatchAsset IBundleServices.TryGetPatchAsset(string assetPath) - { - if (_activeManifest.TryGetPatchAsset(assetPath, out PatchAsset patchAsset)) - return patchAsset; - else - return null; - } - string IBundleServices.MappingToAssetPath(string location) - { - return _activeManifest.MappingToAssetPath(location); - } - string IBundleServices.TryMappingToAssetPath(string location) - { - return _activeManifest.TryMappingToAssetPath(location); - } - string IBundleServices.GetPackageName() - { - return _packageName; - } - bool IBundleServices.IsIncludeBundleFile(string fileName) - { - return _activeManifest.IsIncludeBundleFile(fileName); - } bool IBundleServices.IsServicesValid() { return _activeManifest != null; diff --git a/Assets/YooAsset/Runtime/Services/IBundleServices.cs b/Assets/YooAsset/Runtime/Services/IBundleServices.cs index eaaf197..253a014 100644 --- a/Assets/YooAsset/Runtime/Services/IBundleServices.cs +++ b/Assets/YooAsset/Runtime/Services/IBundleServices.cs @@ -13,36 +13,6 @@ namespace YooAsset /// BundleInfo[] GetAllDependBundleInfos(AssetInfo assetPath); - /// - /// 获取资源信息列表 - /// - AssetInfo[] GetAssetInfos(string[] tags); - - /// - /// 尝试获取补丁资源 - /// - PatchAsset TryGetPatchAsset(string assetPath); - - /// - /// 映射为资源路径 - /// - string MappingToAssetPath(string location); - - /// - /// 尝试映射为资源路径 - /// - string TryMappingToAssetPath(string location); - - /// - /// 获取所属的包裹名 - /// - string GetPackageName(); - - /// - /// 是否包含资源文件 - /// - bool IsIncludeBundleFile(string fileName); - /// /// 服务接口是否有效 ///