Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
MIT License
2.15k
stars
435
forks
source link
refactor: Ensure lengths are always written as uints #2946
In order to unserialize and manage network variables on CMB, we need to know the type of values being serialized inside C#. This PR adds some helper logic to ensure that lengths are getting serialized with a consistent type.
Changed: FastBufferReader and FastBufferWriter so that they always ensure the length of items serialized is always serialized as an uint and added a check before casting for safe reading and writing.
In order to unserialize and manage network variables on CMB, we need to know the type of values being serialized inside C#. This PR adds some helper logic to ensure that lengths are getting serialized with a consistent type.
MPSNGM-274
Changelog
FastBufferReader
andFastBufferWriter
so that they always ensure the length of items serialized is always serialized as anuint
and added a check before casting for safe reading and writing.Testing and Documentation