I heard 4096, i heard unlimited, what is the truth ? ![]()
It’s not to send 500Gb of data, but i want to make sure that 2 or 3Mb data can do it without problems.
thanks a lot.
I heard 4096, i heard unlimited, what is the truth ? ![]()
It’s not to send 500Gb of data, but i want to make sure that 2 or 3Mb data can do it without problems.
thanks a lot.
There is no size limit (at least in 4.x as far as I know). Playing around with it, I was able to send 60mb in one shot… though it was not very fast…
Although , its very old post but new version users might benefit from my answer.
The following is runtime error I recieved when sending an image over networkRPC to other.
“NetworkWriter WriteBytes: buffer is too large (2519800) bytes. The maximum buffer size is 64K bytes.”
So, 64K is cap in sending the byte to RPc and Cmd funtions.
https://docs.unity3d.com/ScriptReference/Networking.ConnectionConfig.FragmentSize.html ------------------------------------------ https://answers.unity.com/questions/1113376/unet-send-big-amount-of-data-over-network-how-to-s.html
– meat5000Thank you meat5000 for sharing those links, I didn't know it could be configured, But I guess, its updated in new versions, because back in 2014s and 2015s, I dont think it was a configurable part. Anyway, Thanks a lot once again.
– devang024
I would like to append to this, after experience, that you will want to chunk the byte array into segments and send pieces over time (but not too fast). Possibly use an RPC on the other end to request for the next chunk once it receives the data.
– farrisartsThat's a good way, I will looking for it next time (Yeah, the question is a bit... old :p)
– BenouKat