跳到主要内容
版本:2.3.x

Class ResourcePackage

Assembly: YooAsset.dll
Declaration
public class ResourcePackage

Properties

InitializeStatus

初始化状态

Declaration
public EOperationStatus InitializeStatus { get; }

PackageValid

包裹是否有效

Declaration
public bool PackageValid { get; }

Fields

PackageName

包裹名

Declaration
public readonly string PackageName

Methods

InitializeAsync(InitializeParameters)

异步初始化

Declaration
public InitializationOperation InitializeAsync(InitializeParameters parameters)
Returns

YooAsset.InitializationOperation

Parameters
TypeName
YooAsset.InitializeParametersparameters

DestroyAsync()

异步销毁

Declaration
public DestroyOperation DestroyAsync()
Returns

YooAsset.DestroyOperation

RequestPackageVersionAsync(bool, int)

请求最新的资源版本

Declaration
public RequestPackageVersionOperation RequestPackageVersionAsync(bool appendTimeTicks = true, int timeout = 60)
Returns

YooAsset.RequestPackageVersionOperation

Parameters
TypeNameDescription
System.BooleanappendTimeTicks在URL末尾添加时间戳
System.Int32timeout超时时间(默认值:60秒)

UpdatePackageManifestAsync(string, int)

更新并加载指定版本的资源清单

Declaration
public UpdatePackageManifestOperation UpdatePackageManifestAsync(string packageVersion, int timeout = 60)
Returns

YooAsset.UpdatePackageManifestOperation

Parameters
TypeNameDescription
System.StringpackageVersion包裹版本
System.Int32timeout超时时间(默认值:60秒)

PreDownloadContentAsync(string, int)

预下载指定版本的包裹资源

Declaration
public PreDownloadContentOperation PreDownloadContentAsync(string packageVersion, int timeout = 60)
Returns

YooAsset.PreDownloadContentOperation

Parameters
TypeNameDescription
System.StringpackageVersion包裹版本
System.Int32timeout超时时间(默认值:60秒)

ClearCacheFilesAsync(EFileClearMode, object)

清理缓存文件

Declaration
public ClearCacheFilesOperation ClearCacheFilesAsync(EFileClearMode clearMode, object clearParam = null)
Returns

YooAsset.ClearCacheFilesOperation

Parameters
TypeNameDescription
YooAsset.EFileClearModeclearMode清理方式
System.ObjectclearParam执行参数

ClearCacheFilesAsync(string, object)

清理缓存文件

Declaration
public ClearCacheFilesOperation ClearCacheFilesAsync(string clearMode, object clearParam = null)
Returns

YooAsset.ClearCacheFilesOperation

Parameters
TypeNameDescription
System.StringclearMode清理方式
System.ObjectclearParam执行参数

GetPackageVersion()

获取当前加载包裹的版本信息

Declaration
public string GetPackageVersion()
Returns

System.String

GetPackageNote()

获取当前加载包裹的备注信息

Declaration
public string GetPackageNote()
Returns

System.String

GetPackageDetails()

获取当前加载包裹的详细信息

Declaration
public PackageDetails GetPackageDetails()
Returns

YooAsset.PackageDetails

UnloadAllAssetsAsync()

强制回收所有资源

Declaration
public UnloadAllAssetsOperation UnloadAllAssetsAsync()
Returns

YooAsset.UnloadAllAssetsOperation

UnloadAllAssetsAsync(UnloadAllAssetsOptions)

强制回收所有资源

Declaration
public UnloadAllAssetsOperation UnloadAllAssetsAsync(UnloadAllAssetsOptions options)
Returns

YooAsset.UnloadAllAssetsOperation

Parameters
TypeNameDescription
YooAsset.UnloadAllAssetsOptionsoptions卸载选项

UnloadUnusedAssetsAsync(int)

回收不再使用的资源 说明:卸载引用计数为零的资源

Declaration
public UnloadUnusedAssetsOperation UnloadUnusedAssetsAsync(int loopCount = 10)
Returns

YooAsset.UnloadUnusedAssetsOperation

Parameters
TypeNameDescription
System.Int32loopCount循环迭代次数

TryUnloadUnusedAsset(string)

资源回收 说明:尝试卸载指定的资源

Declaration
public void TryUnloadUnusedAsset(string location)
Parameters
TypeName
System.Stringlocation

TryUnloadUnusedAsset(AssetInfo)

资源回收 说明:尝试卸载指定的资源

Declaration
public void TryUnloadUnusedAsset(AssetInfo assetInfo)
Parameters
TypeName
YooAsset.AssetInfoassetInfo

IsNeedDownloadFromRemote(string)

是否需要从远端更新下载

Declaration
public bool IsNeedDownloadFromRemote(string location)
Returns

System.Boolean

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址

IsNeedDownloadFromRemote(AssetInfo)

是否需要从远端更新下载

Declaration
public bool IsNeedDownloadFromRemote(AssetInfo assetInfo)
Returns

System.Boolean

Parameters
TypeName
YooAsset.AssetInfoassetInfo

GetAllAssetInfos()

获取所有的资源信息

Declaration
public AssetInfo[] GetAllAssetInfos()
Returns

YooAsset.AssetInfo[]

GetAssetInfos(string)

获取资源信息列表

Declaration
public AssetInfo[] GetAssetInfos(string tag)
Returns

YooAsset.AssetInfo[]

Parameters
TypeNameDescription
System.Stringtag资源标签

GetAssetInfos(string[])

获取资源信息列表

Declaration
public AssetInfo[] GetAssetInfos(string[] tags)
Returns

YooAsset.AssetInfo[]

Parameters
TypeNameDescription
System.String[]tags资源标签列表

GetAssetInfo(string)

获取资源信息

Declaration
public AssetInfo GetAssetInfo(string location)
Returns

YooAsset.AssetInfo

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址

GetAssetInfo(string, Type)

获取资源信息

Declaration
public AssetInfo GetAssetInfo(string location, Type type)
Returns

YooAsset.AssetInfo

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.Typetype资源类型

GetAssetInfoByGUID(string)

获取资源信息

Declaration
public AssetInfo GetAssetInfoByGUID(string assetGUID)
Returns

YooAsset.AssetInfo

Parameters
TypeNameDescription
System.StringassetGUID资源GUID

GetAssetInfoByGUID(string, Type)

获取资源信息

Declaration
public AssetInfo GetAssetInfoByGUID(string assetGUID, Type type)
Returns

YooAsset.AssetInfo

Parameters
TypeNameDescription
System.StringassetGUID资源GUID
System.Typetype资源类型

CheckLocationValid(string)

检查资源定位地址是否有效

Declaration
public bool CheckLocationValid(string location)
Returns

System.Boolean

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址

LoadRawFileSync(AssetInfo)

同步加载原生文件

Declaration
public RawFileHandle LoadRawFileSync(AssetInfo assetInfo)
Returns

YooAsset.RawFileHandle

Parameters
TypeNameDescription
YooAsset.AssetInfoassetInfo资源信息

LoadRawFileSync(string)

同步加载原生文件

Declaration
public RawFileHandle LoadRawFileSync(string location)
Returns

YooAsset.RawFileHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址

LoadRawFileAsync(AssetInfo, uint)

异步加载原生文件

Declaration
public RawFileHandle LoadRawFileAsync(AssetInfo assetInfo, uint priority = 0)
Returns

YooAsset.RawFileHandle

Parameters
TypeNameDescription
YooAsset.AssetInfoassetInfo资源信息
System.UInt32priority加载的优先级

LoadRawFileAsync(string, uint)

异步加载原生文件

Declaration
public RawFileHandle LoadRawFileAsync(string location, uint priority = 0)
Returns

YooAsset.RawFileHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.UInt32priority加载的优先级

LoadSceneSync(string, LoadSceneMode, LocalPhysicsMode)

同步加载场景

Declaration
public SceneHandle LoadSceneSync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None)
Returns

YooAsset.SceneHandle

Parameters
TypeNameDescription
System.Stringlocation场景的定位地址
UnityEngine.SceneManagement.LoadSceneModesceneMode场景加载模式
UnityEngine.SceneManagement.LocalPhysicsModephysicsMode场景物理模式

LoadSceneSync(AssetInfo, LoadSceneMode, LocalPhysicsMode)

同步加载场景

Declaration
public SceneHandle LoadSceneSync(AssetInfo assetInfo, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None)
Returns

YooAsset.SceneHandle

Parameters
TypeNameDescription
YooAsset.AssetInfoassetInfo场景的资源信息
UnityEngine.SceneManagement.LoadSceneModesceneMode场景加载模式
UnityEngine.SceneManagement.LocalPhysicsModephysicsMode场景物理模式

LoadSceneAsync(string, LoadSceneMode, LocalPhysicsMode, bool, uint)

异步加载场景

Declaration
public SceneHandle LoadSceneAsync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None, bool suspendLoad = false, uint priority = 0)
Returns

YooAsset.SceneHandle

Parameters
TypeNameDescription
System.Stringlocation场景的定位地址
UnityEngine.SceneManagement.LoadSceneModesceneMode场景加载模式
UnityEngine.SceneManagement.LocalPhysicsModephysicsMode场景物理模式
System.BooleansuspendLoad场景加载到90%自动挂起
System.UInt32priority加载的优先级

LoadSceneAsync(AssetInfo, LoadSceneMode, LocalPhysicsMode, bool, uint)

异步加载场景

Declaration
public SceneHandle LoadSceneAsync(AssetInfo assetInfo, LoadSceneMode sceneMode = LoadSceneMode.Single, LocalPhysicsMode physicsMode = LocalPhysicsMode.None, bool suspendLoad = false, uint priority = 0)
Returns

YooAsset.SceneHandle

Parameters
TypeNameDescription
YooAsset.AssetInfoassetInfo场景的资源信息
UnityEngine.SceneManagement.LoadSceneModesceneMode场景加载模式
UnityEngine.SceneManagement.LocalPhysicsModephysicsMode场景物理模式
System.BooleansuspendLoad场景加载到90%自动挂起
System.UInt32priority加载的优先级

LoadAssetSync(AssetInfo)

同步加载资源对象

Declaration
public AssetHandle LoadAssetSync(AssetInfo assetInfo)
Returns

YooAsset.AssetHandle

Parameters
TypeNameDescription
YooAsset.AssetInfoassetInfo资源信息

LoadAssetSync<TObject>(string)

同步加载资源对象

Declaration
public AssetHandle LoadAssetSync<TObject>(string location) where TObject : Object
Returns

YooAsset.AssetHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
Type Parameters
NameDescription
TObject资源类型

LoadAssetSync(string, Type)

同步加载资源对象

Declaration
public AssetHandle LoadAssetSync(string location, Type type)
Returns

YooAsset.AssetHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.Typetype资源类型

LoadAssetSync(string)

同步加载资源对象

Declaration
public AssetHandle LoadAssetSync(string location)
Returns

YooAsset.AssetHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址

LoadAssetAsync(AssetInfo, uint)

异步加载资源对象

Declaration
public AssetHandle LoadAssetAsync(AssetInfo assetInfo, uint priority = 0)
Returns

YooAsset.AssetHandle

Parameters
TypeNameDescription
YooAsset.AssetInfoassetInfo资源信息
System.UInt32priority加载的优先级

LoadAssetAsync<TObject>(string, uint)

异步加载资源对象

Declaration
public AssetHandle LoadAssetAsync<TObject>(string location, uint priority = 0) where TObject : Object
Returns

YooAsset.AssetHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.UInt32priority加载的优先级
Type Parameters
NameDescription
TObject资源类型

LoadAssetAsync(string, Type, uint)

异步加载资源对象

Declaration
public AssetHandle LoadAssetAsync(string location, Type type, uint priority = 0)
Returns

YooAsset.AssetHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.Typetype资源类型
System.UInt32priority加载的优先级

LoadAssetAsync(string, uint)

异步加载资源对象

Declaration
public AssetHandle LoadAssetAsync(string location, uint priority = 0)
Returns

YooAsset.AssetHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.UInt32priority加载的优先级

LoadSubAssetsSync(AssetInfo)

同步加载子资源对象

Declaration
public SubAssetsHandle LoadSubAssetsSync(AssetInfo assetInfo)
Returns

YooAsset.SubAssetsHandle

Parameters
TypeNameDescription
YooAsset.AssetInfoassetInfo资源信息

LoadSubAssetsSync<TObject>(string)

同步加载子资源对象

Declaration
public SubAssetsHandle LoadSubAssetsSync<TObject>(string location) where TObject : Object
Returns

YooAsset.SubAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
Type Parameters
NameDescription
TObject资源类型

LoadSubAssetsSync(string, Type)

同步加载子资源对象

Declaration
public SubAssetsHandle LoadSubAssetsSync(string location, Type type)
Returns

YooAsset.SubAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.Typetype子对象类型

LoadSubAssetsSync(string)

同步加载子资源对象

Declaration
public SubAssetsHandle LoadSubAssetsSync(string location)
Returns

YooAsset.SubAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址

LoadSubAssetsAsync(AssetInfo, uint)

异步加载子资源对象

Declaration
public SubAssetsHandle LoadSubAssetsAsync(AssetInfo assetInfo, uint priority = 0)
Returns

YooAsset.SubAssetsHandle

Parameters
TypeNameDescription
YooAsset.AssetInfoassetInfo资源信息
System.UInt32priority加载的优先级

LoadSubAssetsAsync<TObject>(string, uint)

异步加载子资源对象

Declaration
public SubAssetsHandle LoadSubAssetsAsync<TObject>(string location, uint priority = 0) where TObject : Object
Returns

YooAsset.SubAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.UInt32priority加载的优先级
Type Parameters
NameDescription
TObject资源类型

LoadSubAssetsAsync(string, Type, uint)

异步加载子资源对象

Declaration
public SubAssetsHandle LoadSubAssetsAsync(string location, Type type, uint priority = 0)
Returns

YooAsset.SubAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.Typetype子对象类型
System.UInt32priority加载的优先级

LoadSubAssetsAsync(string, uint)

异步加载子资源对象

Declaration
public SubAssetsHandle LoadSubAssetsAsync(string location, uint priority = 0)
Returns

YooAsset.SubAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.UInt32priority加载的优先级

LoadAllAssetsSync(AssetInfo)

同步加载资源包内所有资源对象

Declaration
public AllAssetsHandle LoadAllAssetsSync(AssetInfo assetInfo)
Returns

YooAsset.AllAssetsHandle

Parameters
TypeNameDescription
YooAsset.AssetInfoassetInfo资源信息

LoadAllAssetsSync<TObject>(string)

同步加载资源包内所有资源对象

Declaration
public AllAssetsHandle LoadAllAssetsSync<TObject>(string location) where TObject : Object
Returns

YooAsset.AllAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
Type Parameters
NameDescription
TObject资源类型

LoadAllAssetsSync(string, Type)

同步加载资源包内所有资源对象

Declaration
public AllAssetsHandle LoadAllAssetsSync(string location, Type type)
Returns

YooAsset.AllAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.Typetype子对象类型

LoadAllAssetsSync(string)

同步加载资源包内所有资源对象

Declaration
public AllAssetsHandle LoadAllAssetsSync(string location)
Returns

YooAsset.AllAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址

LoadAllAssetsAsync(AssetInfo, uint)

异步加载资源包内所有资源对象

Declaration
public AllAssetsHandle LoadAllAssetsAsync(AssetInfo assetInfo, uint priority = 0)
Returns

YooAsset.AllAssetsHandle

Parameters
TypeNameDescription
YooAsset.AssetInfoassetInfo资源信息
System.UInt32priority加载的优先级

LoadAllAssetsAsync<TObject>(string, uint)

异步加载资源包内所有资源对象

Declaration
public AllAssetsHandle LoadAllAssetsAsync<TObject>(string location, uint priority = 0) where TObject : Object
Returns

YooAsset.AllAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.UInt32priority加载的优先级
Type Parameters
NameDescription
TObject资源类型

LoadAllAssetsAsync(string, Type, uint)

异步加载资源包内所有资源对象

Declaration
public AllAssetsHandle LoadAllAssetsAsync(string location, Type type, uint priority = 0)
Returns

YooAsset.AllAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.Typetype子对象类型
System.UInt32priority加载的优先级

LoadAllAssetsAsync(string, uint)

异步加载资源包内所有资源对象

Declaration
public AllAssetsHandle LoadAllAssetsAsync(string location, uint priority = 0)
Returns

YooAsset.AllAssetsHandle

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.UInt32priority加载的优先级

CreateResourceDownloader(int, int, int)

创建资源下载器,用于下载当前资源版本所有的资源包文件

Declaration
public ResourceDownloaderOperation CreateResourceDownloader(int downloadingMaxNumber, int failedTryAgain, int timeout = 60)
Returns

YooAsset.ResourceDownloaderOperation

Parameters
TypeNameDescription
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数
System.Int32timeout超时时间

CreateResourceDownloader(string, int, int, int)

创建资源下载器,用于下载指定的资源标签关联的资源包文件

Declaration
public ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain, int timeout = 60)
Returns

YooAsset.ResourceDownloaderOperation

Parameters
TypeNameDescription
System.Stringtag资源标签
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数
System.Int32timeout超时时间

CreateResourceDownloader(string[], int, int, int)

创建资源下载器,用于下载指定的资源标签列表关联的资源包文件

Declaration
public ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout = 60)
Returns

YooAsset.ResourceDownloaderOperation

Parameters
TypeNameDescription
System.String[]tags资源标签列表
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数
System.Int32timeout超时时间

CreateBundleDownloader(string, bool, int, int, int)

创建资源下载器,用于下载指定的资源依赖的资源包文件

Declaration
public ResourceDownloaderOperation CreateBundleDownloader(string location, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain, int timeout = 60)
Returns

YooAsset.ResourceDownloaderOperation

Parameters
TypeNameDescription
System.Stringlocation资源的定位地址
System.BooleanrecursiveDownload下载资源对象所属资源包内所有资源对象依赖的资源包
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数
System.Int32timeout超时时间

CreateBundleDownloader(string, int, int, int)

Declaration
public ResourceDownloaderOperation CreateBundleDownloader(string location, int downloadingMaxNumber, int failedTryAgain, int timeout = 60)
Returns

YooAsset.ResourceDownloaderOperation

Parameters
TypeName
System.Stringlocation
System.Int32downloadingMaxNumber
System.Int32failedTryAgain
System.Int32timeout

CreateBundleDownloader(string[], bool, int, int, int)

创建资源下载器,用于下载指定的资源列表依赖的资源包文件

Declaration
public ResourceDownloaderOperation CreateBundleDownloader(string[] locations, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain, int timeout = 60)
Returns

YooAsset.ResourceDownloaderOperation

Parameters
TypeNameDescription
System.String[]locations资源的定位地址列表
System.BooleanrecursiveDownload下载资源对象所属资源包内所有资源对象依赖的资源包
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数
System.Int32timeout超时时间

CreateBundleDownloader(string[], int, int, int)

Declaration
public ResourceDownloaderOperation CreateBundleDownloader(string[] locations, int downloadingMaxNumber, int failedTryAgain, int timeout = 60)
Returns

YooAsset.ResourceDownloaderOperation

Parameters
TypeName
System.String[]locations
System.Int32downloadingMaxNumber
System.Int32failedTryAgain
System.Int32timeout

CreateBundleDownloader(AssetInfo, bool, int, int, int)

创建资源下载器,用于下载指定的资源依赖的资源包文件

Declaration
public ResourceDownloaderOperation CreateBundleDownloader(AssetInfo assetInfo, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain, int timeout = 60)
Returns

YooAsset.ResourceDownloaderOperation

Parameters
TypeNameDescription
YooAsset.AssetInfoassetInfo资源信息
System.BooleanrecursiveDownload下载资源对象所属资源包内所有资源对象依赖的资源包
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数
System.Int32timeout超时时间

CreateBundleDownloader(AssetInfo, int, int, int)

Declaration
public ResourceDownloaderOperation CreateBundleDownloader(AssetInfo assetInfo, int downloadingMaxNumber, int failedTryAgain, int timeout = 60)
Returns

YooAsset.ResourceDownloaderOperation

Parameters
TypeName
YooAsset.AssetInfoassetInfo
System.Int32downloadingMaxNumber
System.Int32failedTryAgain
System.Int32timeout

CreateBundleDownloader(AssetInfo[], bool, int, int, int)

创建资源下载器,用于下载指定的资源列表依赖的资源包文件

Declaration
public ResourceDownloaderOperation CreateBundleDownloader(AssetInfo[] assetInfos, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain, int timeout = 60)
Returns

YooAsset.ResourceDownloaderOperation

Parameters
TypeNameDescription
YooAsset.AssetInfo[]assetInfos资源信息列表
System.BooleanrecursiveDownload下载资源对象所属资源包内所有资源对象依赖的资源包
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数
System.Int32timeout超时时间

CreateBundleDownloader(AssetInfo[], int, int, int)

Declaration
public ResourceDownloaderOperation CreateBundleDownloader(AssetInfo[] assetInfos, int downloadingMaxNumber, int failedTryAgain, int timeout = 60)
Returns

YooAsset.ResourceDownloaderOperation

Parameters
TypeName
YooAsset.AssetInfo[]assetInfos
System.Int32downloadingMaxNumber
System.Int32failedTryAgain
System.Int32timeout

CreateResourceUnpacker(int, int)

创建内置资源解压器,用于解压当前资源版本所有的资源包文件

Declaration
public ResourceUnpackerOperation CreateResourceUnpacker(int unpackingMaxNumber, int failedTryAgain)
Returns

YooAsset.ResourceUnpackerOperation

Parameters
TypeNameDescription
System.Int32unpackingMaxNumber同时解压的最大文件数
System.Int32failedTryAgain解压失败的重试次数

CreateResourceUnpacker(string, int, int)

创建内置资源解压器,用于解压指定的资源标签关联的资源包文件

Declaration
public ResourceUnpackerOperation CreateResourceUnpacker(string tag, int unpackingMaxNumber, int failedTryAgain)
Returns

YooAsset.ResourceUnpackerOperation

Parameters
TypeNameDescription
System.Stringtag资源标签
System.Int32unpackingMaxNumber同时解压的最大文件数
System.Int32failedTryAgain解压失败的重试次数

CreateResourceUnpacker(string[], int, int)

创建内置资源解压器,用于解压指定的资源标签列表关联的资源包文件

Declaration
public ResourceUnpackerOperation CreateResourceUnpacker(string[] tags, int unpackingMaxNumber, int failedTryAgain)
Returns

YooAsset.ResourceUnpackerOperation

Parameters
TypeNameDescription
System.String[]tags资源标签列表
System.Int32unpackingMaxNumber同时解压的最大文件数
System.Int32failedTryAgain解压失败的重试次数

CreateResourceImporter(string[], int, int)

创建资源导入器 注意:资源文件名称必须和资源服务器部署的文件名称一致!

Declaration
public ResourceImporterOperation CreateResourceImporter(string[] filePaths, int importerMaxNumber, int failedTryAgain)
Returns

YooAsset.ResourceImporterOperation

Parameters
TypeNameDescription
System.String[]filePaths资源路径列表
System.Int32importerMaxNumber同时导入的最大文件数
System.Int32failedTryAgain导入失败的重试次数