Skip to content

Commit cf5d039

Browse files
committed
Keeping exeption for deserialization buffer issue
1 parent 9abffa9 commit cf5d039

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
@@ -3140,10 +3140,7 @@ public void Deserialize(FastBufferReader reader)
31403140
// Try to begin reading the remaining bytes
31413141
if (!reader.TryBeginRead(readSize))
31423142
{
3143-
if (NetworkManager.Singleton.LogLevel <= LogLevel.Error)
3144-
{
3145-
NetworkLog.LogError("Could not deserialize NetworkObject: Reading past the end of the buffer.");
3146-
}
3143+
throw new OverflowException("Could not deserialize SceneObject: Reading past the end of the buffer");
31473144
}
31483145

31493146
if (HasTransform)

0 commit comments

Comments
 (0)