您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
23 行
633 B
23 行
633 B
namespace Unity.Netcode
|
|
{
|
|
/// <summary>
|
|
/// Conveys a version number on a remote node for the given message (identified by its hash)
|
|
/// </summary>
|
|
internal struct MessageVersionData
|
|
{
|
|
public uint Hash;
|
|
public int Version;
|
|
|
|
public void Serialize(FastBufferWriter writer)
|
|
{
|
|
writer.WriteValueSafe(Hash);
|
|
BytePacker.WriteValueBitPacked(writer, Version);
|
|
}
|
|
|
|
public void Deserialize(FastBufferReader reader)
|
|
{
|
|
reader.ReadValueSafe(out Hash);
|
|
ByteUnpacker.ReadValueBitPacked(reader, out Version);
|
|
}
|
|
}
|
|
}
|