-
Notifications
You must be signed in to change notification settings - Fork 459
Closed
Labels
type:bugBug ReportBug Report
Description
Describe the bug
When 16 is passed as the quantity of bits to read to PooledBitReader.ReadBits, the stream only advances 8 bits and only the value of the first 8 bits is returned. This does not appear to be a problem with any value other than 16 for some reason. I am able to read other multiples of 8, 15 bits, 17 bits etc.
I do not know if this is specific to my particular use case of using an Unreliable type data channel and CustomMessagingManager.SendUnnamedMessage;
To Reproduce
Steps to reproduce the behavior:
- Send a stream with a 16 bit value written to it with PooledBitWriter,WriteBits({val},16); via CustomMessagingManager.SendUnnamedMessage over an unreliable type channel
- On receiving client, call ReadBits(16) on a PooledBitReader constructed with the received stream via PooledBitReader.Get.
- Notice the stream has only advanced 8 bits, and the value returned is only the value of the leading 8 bits of the intended 16-bit value.
Expected behavior
Reading 16 bits from the PooledBitReader should advance the stream 16 bits and return the value represented in those 16 bits.
Environment (please complete the following information):
- OS: Windows 10
- Unity Version: 2019.1
- MLAPI Version: v12.1.6
- MLAPI Commit: release build
Metadata
Metadata
Assignees
Labels
type:bugBug ReportBug Report