Hello,
My question is with Raknet, you have network messages like “CONNECTION_REQUEST” etc… But If I have my own messages I would like to send from unity to my server, how would I go about sending them… would I have to use OnNetworkSerialize? or…
Hello,
My question is with Raknet, you have network messages like “CONNECTION_REQUEST” etc… But If I have my own messages I would like to send from unity to my server, how would I go about sending them… would I have to use OnNetworkSerialize? or…
you can’t, you have no access to raknet functionality
either you need to add your own networking or you need to teach your server the automatic syncronization or rpc mechanisms correctly.
I have an item in the wish list for them to add in a way for us to add to the list of user packet enumerators our own packet enumerators. Check it out and vote for it because this would be extremely helpful.
Forgive me if I am wrong though,
In unity you can customize the bit streaming of information correct? for your own values?
So… if the first bit is the enum… could I just send my own enum over as long as it is defined in the server?
If you assign a component to a network view, you can stream whatever you want in the bitstream, correct.
But those data are always meant to be the same data, ie constant size block for each view.
Basing on that, the delta compression will only send what has changed.
If you change the size it will actually go bogus if you try to raise the size.
Unity has no generic network stream in its own networking. If you want that I would recommend to check out the System.Net functionality, the TCP and UDP sockets