Skip to content

Commit b366562

Browse files
committed
Keep Exception on serialize out of buffer space
1 parent 90b5dd3 commit b366562

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

com.unity.netcode.gameobjects/Runtime/Core/NetworkObject.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3053,10 +3053,7 @@ public void Serialize(FastBufferWriter writer)
30533053

30543054
if (!writer.TryBeginWrite(writeSize))
30553055
{
3056-
if (NetworkManager.Singleton.LogLevel <= LogLevel.Error)
3057-
{
3058-
NetworkLog.LogError("Could not serialize NetworkObject: Out of buffer space.");
3059-
}
3056+
throw new OverflowException("Could not serialize SceneObject: Out of buffer space.");
30603057
}
30613058

30623059
if (HasTransform)

0 commit comments

Comments
 (0)