Simple unreliable UDP send

I suspect there is not a good answer to my question, but I'm hoping someone can prove me wrong. I would like to "just send a UDP network message" using the built-in Unity networking layer.

In pursuit of that, here is what I have found:

There are 2 basic methods to send data across the network in Unity

  • NetworkView synchronization
  • RPC

Okay fine great.

BUT, apparently each one only provides half of what I need to just send unreliable UDP packets.

If I use network views with 'unreliable' set and a custom OnSerializeNetworkView implementation then I can send packets unreliably (or so it seems). However, all late joining clients receive a buffered history of old messages?

If I use RPCs then I can get rid of the buffering. BUT RPCs are only reliable?!!

Is there a way to get both unreliable and unbuffered message sending without resorting to writing my own network plugin?

These two functions are the only possibility to send any information through realtime network if you want to work with the built in networking and don't want to use UDP Sockets (System.Net).

And you are correct, RPCs are always reliable (thats the definition and base of Remote Procedure Calls, that its granted that the remote procedure is called), you can not change that.

The buffering that you see, which seems to be your problem, is actually likely caused by you. You potentially used a buffered RPC to instantiate the object or use Network.Instantiate As a consequence the changes need to be buffered so the object can be brought up to date to the current state now.

If you want to roll something own, I recommend to start with giving Lidgren a look

I guess my question for you is why would you send anything that would potentially never make it to the destination in the first place? If it was something important than you would want it sent reliably. For movement and such you would just use unreliable in the networkview and you are good. As for things like events that you want everyone to see you should send it reliably.