diff --git a/Assets/Mirror/Core/NetworkReader.cs b/Assets/Mirror/Core/NetworkReader.cs index 869f78f9a..e8c9a273a 100644 --- a/Assets/Mirror/Core/NetworkReader.cs +++ b/Assets/Mirror/Core/NetworkReader.cs @@ -23,22 +23,14 @@ public class NetworkReader public int Position; /// Remaining bytes that can be read, for convenience. - public int Remaining - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => buffer.Count - Position; - } + public int Remaining => buffer.Count - Position; + + /// Total buffer capacity, independent of reader position. + public int Capacity => buffer.Count; [Obsolete("NetworkReader.Length was renamed to Capacity")] // 2022-09-25 public int Length => Capacity; - /// Total buffer capacity, independent of reader position. - public int Capacity - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => buffer.Count; - } - public NetworkReader(byte[] bytes) { buffer = new ArraySegment(bytes);