예제 #1
0
        public void TestCustomRW()
        {
            var quest = new MockQuest(100);

            byte[] data = MessagePacker.Pack(quest);

            MockQuest unpacked = MessagePacker.Unpack <MockQuest>(data);

            Assert.That(unpacked.Id, Is.EqualTo(100));
        }
예제 #2
0
 public static void WriteQuest(this NetworkWriter writer, MockQuest quest)
 {
     writer.WritePackedInt32(quest.Id);
 }