diff --git a/Assets/Mirror/Runtime/NetworkIdentity.cs b/Assets/Mirror/Runtime/NetworkIdentity.cs index b79658027..3490c887f 100644 --- a/Assets/Mirror/Runtime/NetworkIdentity.cs +++ b/Assets/Mirror/Runtime/NetworkIdentity.cs @@ -997,7 +997,7 @@ internal void OnDeserializeAllSafely(NetworkReader reader, bool initialState) { // deserialize all components that were received NetworkBehaviour[] components = NetworkBehaviours; - while (reader.Position < reader.Length) + while (reader.Remaining > 0) { // read & check index [0..255] byte index = reader.ReadByte();