mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
syntax
This commit is contained in:
parent
af94cb902c
commit
fbd3342a76
@ -32,7 +32,6 @@ public static MockQuest WriteQuest(this NetworkReader reader)
|
||||
[TestFixture]
|
||||
public class CustomRWTest
|
||||
{
|
||||
|
||||
public struct QuestMessage : NetworkMessage
|
||||
{
|
||||
public MockQuest quest;
|
||||
@ -41,15 +40,13 @@ public struct QuestMessage : NetworkMessage
|
||||
[Test]
|
||||
public void TestCustomRW()
|
||||
{
|
||||
QuestMessage message = new QuestMessage()
|
||||
QuestMessage message = new QuestMessage
|
||||
{
|
||||
quest = new MockQuest(100)
|
||||
};
|
||||
|
||||
byte[] data = MessagePackingTest.PackToByteArray(message);
|
||||
|
||||
QuestMessage unpacked = MessagePackingTest.UnpackFromByteArray<QuestMessage>(data);
|
||||
|
||||
Assert.That(unpacked.quest.Id, Is.EqualTo(100));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user