update asset bundle debugger

This commit is contained in:
何冠峰
2025-03-05 17:26:58 +08:00
parent ed9692574c
commit e58999e484
10 changed files with 115 additions and 66 deletions

View File

@@ -5,7 +5,7 @@ using System.Collections.Generic;
namespace YooAsset
{
[Serializable]
internal class DebugBundleInfo : IComparer<DebugBundleInfo>, IComparable<DebugBundleInfo>
internal struct DebugBundleInfo : IComparer<DebugBundleInfo>, IComparable<DebugBundleInfo>
{
/// <summary>
/// 资源包名称
@@ -20,7 +20,7 @@ namespace YooAsset
/// <summary>
/// 加载状态
/// </summary>
public EOperationStatus Status;
public string Status;
/// <summary>
/// 谁引用了该资源包

View File

@@ -5,7 +5,7 @@ using System.Collections.Generic;
namespace YooAsset
{
[Serializable]
internal class DebugOperationInfo : IComparer<DebugOperationInfo>, IComparable<DebugOperationInfo>
internal struct DebugOperationInfo : IComparer<DebugOperationInfo>, IComparable<DebugOperationInfo>
{
/// <summary>
/// 任务名称

View File

@@ -47,7 +47,7 @@ namespace YooAsset
else
{
UnityEngine.Debug.LogError($"Can not found {nameof(DebugBundleInfo)} : {bundleName}");
return null;
return default;
}
}
}

View File

@@ -5,7 +5,7 @@ using System.Collections.Generic;
namespace YooAsset
{
[Serializable]
internal class DebugProviderInfo : IComparer<DebugProviderInfo>, IComparable<DebugProviderInfo>
internal struct DebugProviderInfo : IComparer<DebugProviderInfo>, IComparable<DebugProviderInfo>
{
/// <summary>
/// 包裹名

View File

@@ -385,7 +385,7 @@ namespace YooAsset
var bundleInfo = new DebugBundleInfo();
bundleInfo.BundleName = packageBundle.BundleName;
bundleInfo.RefCount = bundleLoader.RefCount;
bundleInfo.Status = bundleLoader.Status;
bundleInfo.Status = bundleLoader.Status.ToString();
bundleInfo.ReferenceBundles = FilterReferenceBundles(packageBundle);
result.Add(bundleInfo);
}