namespace AlicizaX.Resource.Runtime
{
[Prewarm(2)]
public readonly struct AssetDownloadProgressUpdateEventArgs : IEventArgs
{
///
/// 包名称
///
public readonly string PackageName;
///
/// 总下载数量
///
public readonly int TotalDownloadCount;
///
/// 当前下载数量
///
public readonly int CurrentDownloadCount;
///
/// 总下载大小
///
public readonly long TotalDownloadSizeBytes;
///
/// 当前下载大小
///
public readonly long CurrentDownloadSizeBytes;
public AssetDownloadProgressUpdateEventArgs(string packageName, int totalDownloadCount, int currentDownloadCount, long totalDownloadSizeBytes, long currentDownloadSizeBytes)
{
PackageName = packageName;
TotalDownloadCount = totalDownloadCount;
CurrentDownloadCount = currentDownloadCount;
TotalDownloadSizeBytes = totalDownloadSizeBytes;
CurrentDownloadSizeBytes = currentDownloadSizeBytes;
}
///
/// 创建下载进度更新
///
/// 包名称
/// 总下载数量
/// 当前下载数量
/// 总下载大小
/// 当前下载大小
///
public static AssetDownloadProgressUpdateEventArgs Create(string packageName, int totalDownloadCount, int currentDownloadCount, long totalDownloadSizeBytes, long currentDownloadSizeBytes)
{
return new AssetDownloadProgressUpdateEventArgs(packageName, totalDownloadCount, currentDownloadCount, totalDownloadSizeBytes, currentDownloadSizeBytes);
}
}
}