Update YooAsset
parent
8583927c48
commit
6c0fbdae1f
|
@ -304,7 +304,7 @@ namespace YooAsset
|
|||
|
||||
foreach (var provider in _providers)
|
||||
{
|
||||
DebugSummy.DebugProviderInfo providerInfo = new DebugSummy.DebugProviderInfo();
|
||||
DebugProviderInfo providerInfo = new DebugProviderInfo();
|
||||
providerInfo.AssetPath = provider.AssetPath;
|
||||
providerInfo.RefCount = provider.RefCount;
|
||||
providerInfo.Status = (int)provider.Status;
|
||||
|
|
|
@ -66,16 +66,16 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取资源包的调试信息列表
|
||||
/// </summary>
|
||||
internal void GetBundleDebugInfos(List<DebugSummy.DebugBundleInfo> output)
|
||||
internal void GetBundleDebugInfos(List<DebugBundleInfo> output)
|
||||
{
|
||||
foreach (var loader in _dependBundles)
|
||||
{
|
||||
var debugInfo = new DebugSummy.DebugBundleInfo();
|
||||
debugInfo.BundleName = loader.BundleFileInfo.BundleName;
|
||||
debugInfo.Version = loader.BundleFileInfo.Version;
|
||||
debugInfo.RefCount = loader.RefCount;
|
||||
debugInfo.Status = (int)loader.Status;
|
||||
output.Add(debugInfo);
|
||||
var bundleInfo = new DebugBundleInfo();
|
||||
bundleInfo.BundleName = loader.BundleFileInfo.BundleName;
|
||||
bundleInfo.Version = loader.BundleFileInfo.Version;
|
||||
bundleInfo.RefCount = loader.RefCount;
|
||||
bundleInfo.Status = (int)loader.Status;
|
||||
output.Add(bundleInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,14 +36,14 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取资源包的调试信息列表
|
||||
/// </summary>
|
||||
internal void GetBundleDebugInfos(List<DebugSummy.DebugBundleInfo> output)
|
||||
internal void GetBundleDebugInfos(List<DebugBundleInfo> output)
|
||||
{
|
||||
var ownerInfo = new DebugSummy.DebugBundleInfo();
|
||||
ownerInfo.BundleName = OwnerBundle.BundleFileInfo.BundleName;
|
||||
ownerInfo.Version = OwnerBundle.BundleFileInfo.Version;
|
||||
ownerInfo.RefCount = OwnerBundle.RefCount;
|
||||
ownerInfo.Status = (int)OwnerBundle.Status;
|
||||
output.Add(ownerInfo);
|
||||
var bundleInfo = new DebugBundleInfo();
|
||||
bundleInfo.BundleName = OwnerBundle.BundleFileInfo.BundleName;
|
||||
bundleInfo.Version = OwnerBundle.BundleFileInfo.Version;
|
||||
bundleInfo.RefCount = OwnerBundle.RefCount;
|
||||
bundleInfo.Status = (int)OwnerBundle.Status;
|
||||
output.Add(bundleInfo);
|
||||
|
||||
DependBundles.GetBundleDebugInfos(output);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal class DebugBundleInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源包名称
|
||||
/// </summary>
|
||||
public string BundleName { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 资源版本
|
||||
/// </summary>
|
||||
public int Version { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 引用计数
|
||||
/// </summary>
|
||||
public int RefCount { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 加载状态
|
||||
/// </summary>
|
||||
public int Status { set; get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8338e9d79d24e7e4e80aaacc8bc0fcde
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal class DebugProviderInfo : IComparer<DebugProviderInfo>, IComparable<DebugProviderInfo>
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源对象路径
|
||||
/// </summary>
|
||||
public string AssetPath { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 引用计数
|
||||
/// </summary>
|
||||
public int RefCount { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 加载状态
|
||||
/// </summary>
|
||||
public int Status { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 依赖的资源包列表
|
||||
/// </summary>
|
||||
public readonly List<DebugBundleInfo> BundleInfos = new List<DebugBundleInfo>();
|
||||
|
||||
public int CompareTo(DebugProviderInfo other)
|
||||
{
|
||||
return Compare(this, other);
|
||||
}
|
||||
public int Compare(DebugProviderInfo a, DebugProviderInfo b)
|
||||
{
|
||||
return string.CompareOrdinal(a.AssetPath, b.AssetPath);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b3af795872a84c6429235be37acaf655
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源系统调试信息汇总
|
||||
/// </summary>
|
||||
internal class DebugSummy
|
||||
{
|
||||
public readonly List<DebugProviderInfo> ProviderInfos = new List<DebugProviderInfo>(1000);
|
||||
public int BundleCount { set; get; }
|
||||
public int AssetCount { set; get; }
|
||||
|
||||
public void ClearAll()
|
||||
{
|
||||
ProviderInfos.Clear();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
public class DebugSummy
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源包调试信息
|
||||
/// </summary>
|
||||
public class DebugBundleInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源包名称
|
||||
/// </summary>
|
||||
public string BundleName { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 资源版本
|
||||
/// </summary>
|
||||
public int Version { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 引用计数
|
||||
/// </summary>
|
||||
public int RefCount { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 加载状态
|
||||
/// </summary>
|
||||
public int Status { set; get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 资源加载对象调试信息
|
||||
/// </summary>
|
||||
public class DebugProviderInfo : IComparer<DebugProviderInfo>, IComparable<DebugProviderInfo>
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源对象路径
|
||||
/// </summary>
|
||||
public string AssetPath { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 引用计数
|
||||
/// </summary>
|
||||
public int RefCount { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 加载状态
|
||||
/// </summary>
|
||||
public int Status { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 依赖的资源包列表
|
||||
/// </summary>
|
||||
public readonly List<DebugBundleInfo> BundleInfos = new List<DebugBundleInfo>();
|
||||
|
||||
public int CompareTo(DebugProviderInfo other)
|
||||
{
|
||||
return Compare(this, other);
|
||||
}
|
||||
public int Compare(DebugProviderInfo a, DebugProviderInfo b)
|
||||
{
|
||||
return string.CompareOrdinal(a.AssetPath, b.AssetPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public readonly List<DebugProviderInfo> ProviderInfos = new List<DebugProviderInfo>(1000);
|
||||
public int BundleCount { set; get; }
|
||||
public int AssetCount { set; get; }
|
||||
|
||||
public void ClearAll()
|
||||
{
|
||||
ProviderInfos.Clear();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -280,7 +280,7 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 获取调试汇总信息
|
||||
/// </summary>
|
||||
public static void GetDebugSummy(DebugSummy summy)
|
||||
internal static void GetDebugSummy(DebugSummy summy)
|
||||
{
|
||||
if (summy == null)
|
||||
YooLogger.Error($"{nameof(DebugSummy)} is null");
|
||||
|
|
Loading…
Reference in New Issue