I’ve seen the existing answers to this but half of them claim UDP while the other half claim TCP. I’ve glanced through a couple of articles on ‘Remote Procedure Calls’ which have indicated that it could be either, and the Unity RPC reference page doesn’t state which it is.
Can anyone tell me with surety whether RPC’s use UDP or TCP?
Unity uses RAKNET for networking. Referring to the RAKNET FAQ…
Does RakNet use TCP at all?
RakPeer does not. However, some plugins support it - EmailSender, Autopatcher, FileListTransfer, DeltaDirectoryTransfer.
This can further be deduced by the fact that you can use the same NetworkView for both unreliable sync (which implies UDP) and RPC calls.
If you need still more proof, find a network traffic analyzer (or if you’re using Windows you can use the netstat command), make some RPC calls, and verify that there aren’t any TCP/IP connections. You’ll see only RPC traffic.