Background: I'm trying to add voice chat to the game so that only those who are close to the person speaking will hear it.
From my understanding OnSerializeNetworkView is the only way to stream unreliable data, but can I make it so it doesn't send the data to other clients and only the server? I want the server to chose who gets to see the data and who doesn't, and all ways I know how to do this is to just ignore the data in the clients who shouldn't get it. This is of course not a viable solution as it would take extra bandwidth for no purpose.
asked Aug 19 '12 at 08:01 AM
when you use a client-server-client model and send data from one client to another, this data is received by server and sends again to client, so you could make a custom OnSerializeNetworkView for server, that will change received data before send it to others.
so just check if you are on server and after receiving data work with it before sending.
answered Aug 20 '12 at 10:26 PM