Init TEngine4.0.0

Init TEngine4.0.0
This commit is contained in:
ALEXTANG
2023-10-08 15:21:33 +08:00
parent 4c8c37ffd8
commit 8c3d6308b9
3773 changed files with 49313 additions and 150734 deletions

View File

@@ -0,0 +1,45 @@
using System;
using System.Text;
using UnityEngine;
namespace YooAsset
{
internal enum ERemoteCommand
{
/// <summary>
/// 采样一次
/// </summary>
SampleOnce = 0,
}
[Serializable]
internal class RemoteCommand
{
/// <summary>
/// 命令类型
/// </summary>
public int CommandType;
/// <summary>
/// 命令附加参数
/// </summary>
public string CommandParam;
/// <summary>
/// 序列化
/// </summary>
public static byte[] Serialize(RemoteCommand command)
{
return Encoding.UTF8.GetBytes(JsonUtility.ToJson(command));
}
/// <summary>
/// 反序列化
/// </summary>
public static RemoteCommand Deserialize(byte[] data)
{
return JsonUtility.FromJson<RemoteCommand>(Encoding.UTF8.GetString(data));
}
}
}