mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkServerTest: VariableSize message size adjusted for WriteBytesAndSize header
This commit is contained in:
parent
8ded81fa20
commit
e78304c465
@ -11,8 +11,11 @@ struct TestMessage1 : NetworkMessage {}
|
||||
|
||||
struct VariableSizedMessage : NetworkMessage
|
||||
{
|
||||
// weaver serializes byte[] wit WriteBytesAndSize
|
||||
public byte[] payload;
|
||||
public VariableSizedMessage(int size) => payload = new byte[size];
|
||||
// so payload := size - 4
|
||||
// then the message is exactly maxed size.
|
||||
public VariableSizedMessage(int size) => payload = new byte[size - 4];
|
||||
}
|
||||
|
||||
public class CommandTestNetworkBehaviour : NetworkBehaviour
|
||||
|
Loading…
Reference in New Issue
Block a user