-
Notifications
You must be signed in to change notification settings - Fork 40
Description
My project involves data synchronization. To accomplish that I use Netcode for Gameobjets and Unity Relay service. In the project, there is one 3D human model which is NetworkObject. Depending on the specifics of the project, it is important to synchronize the least amount of data. However, the measured result significantly missed my expectations. Let me explain in more detail:
I am sending the data using NetworkVariable. The first NetworkVariable contains one Vector3 and the second one contains CustomData object that holds 5 variables of type short. All this comes out to a total of 22 bytes. Because together with the sending, there is also the receiving, we get 44 bytes per frame. Let's say there is 30 FPS, so data usage per minute is 44X30X60=79 200 B = 77,3 KB = 0,076 MB. In addition to this, some data is needed for protocol implementation, although as a rule, their amount is not large. But, after testing the app, data usage came out to about 0,5 MB per minute. I can't figure out why is there such a big difference between my calculation and the measurement. Do you have any idea what can be the reason for such a big bandwidth consumption? Am I doing something wrong or is this result normal?
Below is the test program code that handles data synchronization. It is attached to the 3D human model.
Thank you in advance!