mirror of https://github.com/tuyoogame/YooAsset
parent
36f561a595
commit
16344393a1
|
@ -0,0 +1,61 @@
|
|||
|
||||
namespace YooAsset
|
||||
{
|
||||
public class PackageDetails
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件版本
|
||||
/// </summary>
|
||||
public string FileVersion;
|
||||
|
||||
/// <summary>
|
||||
/// 启用可寻址资源定位
|
||||
/// </summary>
|
||||
public bool EnableAddressable;
|
||||
|
||||
/// <summary>
|
||||
/// 资源定位地址大小写不敏感
|
||||
/// </summary>
|
||||
public bool LocationToLower;
|
||||
|
||||
/// <summary>
|
||||
/// 包含资源GUID数据
|
||||
/// </summary>
|
||||
public bool IncludeAssetGUID;
|
||||
|
||||
/// <summary>
|
||||
/// 文件名称样式
|
||||
/// </summary>
|
||||
public int OutputNameStyle;
|
||||
|
||||
/// <summary>
|
||||
/// 构建管线名称
|
||||
/// </summary>
|
||||
public string BuildPipeline;
|
||||
|
||||
/// <summary>
|
||||
/// 资源包裹名称
|
||||
/// </summary>
|
||||
public string PackageName;
|
||||
|
||||
/// <summary>
|
||||
/// 资源包裹的版本信息
|
||||
/// </summary>
|
||||
public string PackageVersion;
|
||||
|
||||
/// <summary>
|
||||
/// 资源包裹的备注信息
|
||||
/// </summary>
|
||||
public string PackageNote;
|
||||
|
||||
/// <summary>
|
||||
/// 主资源文件总数
|
||||
/// </summary>
|
||||
public int AssetTotalCount;
|
||||
|
||||
/// <summary>
|
||||
/// 资源包文件总数
|
||||
/// </summary>
|
||||
public int BundleTotalCount;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 931f6c93109389b4f8fd4d48857d082b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -105,6 +105,26 @@ namespace YooAsset
|
|||
public Dictionary<string, string> AssetPathMapping2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取包裹的详细信息
|
||||
/// </summary>
|
||||
public PackageDetails GetPackageDetails()
|
||||
{
|
||||
PackageDetails details = new PackageDetails();
|
||||
details.FileVersion = FileVersion;
|
||||
details.EnableAddressable = EnableAddressable;
|
||||
details.LocationToLower = LocationToLower;
|
||||
details.IncludeAssetGUID = IncludeAssetGUID;
|
||||
details.OutputNameStyle = OutputNameStyle;
|
||||
details.BuildPipeline = BuildPipeline;
|
||||
details.PackageName = PackageName;
|
||||
details.PackageVersion = PackageVersion;
|
||||
details.PackageNote = PackageNote;
|
||||
details.AssetTotalCount = AssetList.Count;
|
||||
details.BundleTotalCount = BundleList.Count;
|
||||
return details;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 尝试映射为资源路径
|
||||
/// </summary>
|
||||
|
|
|
@ -258,7 +258,7 @@ namespace YooAsset
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取本地包裹的版本信息
|
||||
/// 获取当前激活包裹的版本信息
|
||||
/// </summary>
|
||||
public string GetPackageVersion()
|
||||
{
|
||||
|
@ -267,7 +267,7 @@ namespace YooAsset
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取本地包裹的备注信息
|
||||
/// 获取当前激活包裹的备注信息
|
||||
/// </summary>
|
||||
public string GetPackageNote()
|
||||
{
|
||||
|
@ -275,6 +275,15 @@ namespace YooAsset
|
|||
return _playModeImpl.ActiveManifest.PackageNote;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前激活包裹的详细信息
|
||||
/// </summary>
|
||||
public PackageDetails GetPackageDetails()
|
||||
{
|
||||
DebugCheckInitialize();
|
||||
return _playModeImpl.ActiveManifest.GetPackageDetails();
|
||||
}
|
||||
|
||||
#region 资源回收
|
||||
/// <summary>
|
||||
/// 强制回收所有资源
|
||||
|
|
Loading…
Reference in New Issue