update resource manager

重构运行时核心代码
This commit is contained in:
何冠峰
2024-12-24 18:45:37 +08:00
parent 6254d00bb5
commit 4fc0d06908
56 changed files with 610 additions and 1715 deletions

View File

@@ -3,19 +3,14 @@ namespace YooAsset
{
internal class BundleInfo
{
private readonly string _importFilePath;
private readonly IFileSystem _fileSystem;
private readonly string _importFilePath;
/// <summary>
/// 资源包对象
/// </summary>
public readonly PackageBundle Bundle;
/// <summary>
/// 注意:该字段只用于帮助编辑器下的模拟模式。
/// </summary>
public string[] IncludeAssetsInEditor;
public BundleInfo(IFileSystem fileSystem, PackageBundle bundle)
{
@@ -31,21 +26,13 @@ namespace YooAsset
}
/// <summary>
/// 加载资源文件
/// 加载资源
/// </summary>
public FSLoadBundleOperation LoadBundleFile()
{
return _fileSystem.LoadBundleFile(Bundle);
}
/// <summary>
/// 卸载资源文件
/// </summary>
public void UnloadBundleFile(object result)
{
_fileSystem.UnloadBundleFile(Bundle, result);
}
/// <summary>
/// 创建下载器
/// </summary>