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

Class TaskUpdateBundleInfo

更新资源包构建信息的任务抽象基类,用于填充哈希、CRC、大小及输出路径等字段。

Assembly: YooAsset.Editor.dll
View Source
Declaration
public abstract class TaskUpdateBundleInfo

Methods

UpdateBundleInfo(BuildContext)

根据构建上下文更新所有资源包的路径与校验信息

View Source
Declaration
public void UpdateBundleInfo(BuildContext context)
Parameters
TypeNameDescription
YooAsset.Editor.BuildContextcontext构建上下文

GetUnityHash(BuildBundleInfo, BuildContext)

获取 Unity 记录的资源包哈希值

View Source
Declaration
protected abstract string GetUnityHash(BuildBundleInfo bundleInfo, BuildContext context)
Returns

System.String: Unity 哈希字符串

Parameters
TypeNameDescription
YooAsset.Editor.BuildBundleInfobundleInfo资源包构建信息
YooAsset.Editor.BuildContextcontext构建上下文

GetUnityCRC(BuildBundleInfo, BuildContext)

获取 Unity 记录的资源包 CRC

View Source
Declaration
protected abstract uint GetUnityCRC(BuildBundleInfo bundleInfo, BuildContext context)
Returns

System.UInt32: Unity CRC 值

Parameters
TypeNameDescription
YooAsset.Editor.BuildBundleInfobundleInfo资源包构建信息
YooAsset.Editor.BuildContextcontext构建上下文

GetBundleFileHash(BuildBundleInfo, BuildContext)

获取资源包文件的哈希值(用于远端文件名等)

View Source
Declaration
protected abstract string GetBundleFileHash(BuildBundleInfo bundleInfo, BuildContext context)
Returns

System.String: 文件哈希字符串

Parameters
TypeNameDescription
YooAsset.Editor.BuildBundleInfobundleInfo资源包构建信息
YooAsset.Editor.BuildContextcontext构建上下文

GetBundleFileCRC(BuildBundleInfo, BuildContext)

获取资源包文件的 CRC

View Source
Declaration
protected abstract uint GetBundleFileCRC(BuildBundleInfo bundleInfo, BuildContext context)
Returns

System.UInt32: 文件 CRC 值

Parameters
TypeNameDescription
YooAsset.Editor.BuildBundleInfobundleInfo资源包构建信息
YooAsset.Editor.BuildContextcontext构建上下文

GetBundleFileSize(BuildBundleInfo, BuildContext)

获取资源包文件大小(字节)

View Source
Declaration
protected abstract long GetBundleFileSize(BuildBundleInfo bundleInfo, BuildContext context)
Returns

System.Int64: 文件大小

Parameters
TypeNameDescription
YooAsset.Editor.BuildBundleInfobundleInfo资源包构建信息
YooAsset.Editor.BuildContextcontext构建上下文