mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
更新Demo
更新Demo
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源系统调试信息
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
internal class DebugReport
|
||||
{
|
||||
/// <summary>
|
||||
/// 游戏帧
|
||||
/// </summary>
|
||||
public int FrameCount;
|
||||
|
||||
/// <summary>
|
||||
/// 调试的包裹数据列表
|
||||
/// </summary>
|
||||
public List<DebugPackageData> PackageDatas = new List<DebugPackageData>(10);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 序列化
|
||||
/// </summary>
|
||||
public static byte[] Serialize(DebugReport debugReport)
|
||||
{
|
||||
return Encoding.UTF8.GetBytes(JsonUtility.ToJson(debugReport));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 反序列化
|
||||
/// </summary>
|
||||
public static DebugReport Deserialize(byte[] data)
|
||||
{
|
||||
return JsonUtility.FromJson<DebugReport>(Encoding.UTF8.GetString(data));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user