You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Risord
Yeah, this indeed does look like it does not honor the ArraySegment and a fix would be for us to create a new constructor that does not include the length or offset parameters in order to be 100% sure of the intended usage.
For now, the work around would be to add the offset in the constuctor:
var bytes = new byte[] { 0, 1, 2, 3 };
var segment = new System.ArraySegment<byte>(bytes, 1, 3);
var reader = new Unity.Netcode.FastBufferReader(segment, Unity.Collections.Allocator.Temp, offset: 1);
Description
Expected Outcome
Both prints output: 1,2,3
Environment
The text was updated successfully, but these errors were encountered: