diff --git a/Assets/Mirror/Tests/Editor/MessagePackingTest.cs b/Assets/Mirror/Tests/Editor/MessagePackingTest.cs index c39f99c56..570edb435 100644 --- a/Assets/Mirror/Tests/Editor/MessagePackingTest.cs +++ b/Assets/Mirror/Tests/Editor/MessagePackingTest.cs @@ -1,5 +1,8 @@ using System; +using Mirror.Tests.MessageTests; using NUnit.Framework; +using UnityEngine; + namespace Mirror.Tests { [TestFixture] @@ -34,6 +37,16 @@ public static T UnpackFromByteArray(byte[] data) } } + // message id is generated from message.FullName. + // should be consistent across all platforms. + [Test] + public void GetId() + { + // "Mirror.Tests.MessageTests.TestMessage" + Debug.Log(typeof(TestMessage).FullName); + Assert.That(MessagePacking.GetId(), Is.EqualTo(0x8706)); + } + [Test] public void TestPacking() {