mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Add BytesMessage (#214)
This commit is contained in:
parent
a0e763bd38
commit
3ce7eb9915
@ -41,6 +41,30 @@ public override void Serialize(NetworkWriter writer)
|
||||
}
|
||||
}
|
||||
|
||||
public class BytesMessage : MessageBase
|
||||
{
|
||||
public byte[] value;
|
||||
|
||||
public BytesMessage()
|
||||
{
|
||||
}
|
||||
|
||||
public BytesMessage(byte[] v)
|
||||
{
|
||||
value = v;
|
||||
}
|
||||
|
||||
public override void Deserialize(NetworkReader reader)
|
||||
{
|
||||
value = reader.ReadBytesAndSize();
|
||||
}
|
||||
|
||||
public override void Serialize(NetworkWriter writer)
|
||||
{
|
||||
writer.WriteBytesAndSize(value);
|
||||
}
|
||||
}
|
||||
|
||||
public class IntegerMessage : MessageBase
|
||||
{
|
||||
public int value;
|
||||
|
Loading…
Reference in New Issue
Block a user