-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Message base class not being Serialized if processed in the wron…
…g order (#2023) * finding all fields * adding test for message with base * undoing FindAllPublicFields * adding tests for Inheritance with define order * making sure that messages are processed in order do not need to check if message has already been processed becuase OnSerialize is only added/changed if it is missing or empty * removing un-needed comments * using recursion instead of loops * remove white space
- Loading branch information
1 parent
264f9b8
commit 3418fa2
Showing
5 changed files
with
138 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Assets/Mirror/Tests/Editor/Weaver/WeaverMessageTests~/MessageWithBaseClass.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using Mirror; | ||
using UnityEngine; | ||
|
||
namespace WeaverMessageTests.MessageWithBaseClass | ||
{ | ||
class MessageWithBaseClass : SomeBaseMessage | ||
{ | ||
public uint netId; | ||
public Guid assetId; | ||
public Vector3 position; | ||
public Quaternion rotation; | ||
public byte[] payload; | ||
} | ||
|
||
class SomeBaseMessage : MessageBase | ||
{ | ||
public int myExtraType; | ||
} | ||
} |