-
Notifications
You must be signed in to change notification settings - Fork 450
fix: Unity.Netcode.RuntimeTests Failing on Console - v1.1.0 #1653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
75a8e33
5c040a6
5bffb1c
06f518c
dce9e98
22a9588
356b1b8
10ea0e6
b6d44ec
80fc011
b06cc5c
91f368c
900e96b
cd31bc8
8d7fb9d
e0e8b48
1905b6f
ed0c17f
bde1e90
73ee4fb
f6b693f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ public void Serialize(FastBufferWriter writer) | |
// This var does not belong to the currently iterating delivery group. | ||
if (NetworkBehaviour.NetworkManager.NetworkConfig.EnsureNetworkVariableLengthSafety) | ||
{ | ||
writer.WriteValueSafe((short)0); | ||
writer.WriteValueSafe((ushort)0); | ||
} | ||
else | ||
{ | ||
|
@@ -69,7 +69,12 @@ public void Serialize(FastBufferWriter writer) | |
var tmpWriter = new FastBufferWriter(MessagingSystem.NON_FRAGMENTED_MESSAGE_MAX_SIZE, Allocator.Temp, short.MaxValue); | ||
NetworkBehaviour.NetworkVariableFields[k].WriteDelta(tmpWriter); | ||
|
||
writer.WriteValueSafe((ushort)tmpWriter.Length); | ||
if (!writer.TryBeginWrite(FastBufferWriter.GetWriteSize<ushort>() + tmpWriter.Length)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this does not fix the issue with NetworkLists that exceed the MessagingSystem.NON_FRAGMENTED_MESSAGE_MAX_SIZE, I put this in place as it was missed in the back port. |
||
{ | ||
throw new OverflowException($"Not enough space in the buffer to write {nameof(NetworkVariableDeltaMessage)}"); | ||
} | ||
|
||
writer.WriteValue((ushort)tmpWriter.Length); | ||
tmpWriter.CopyTo(writer); | ||
} | ||
else | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these changes are part of a backport, approved by Simon