Unity RPC calls slow
Crossbones+ - Reputation: 1919
Posted 01 February 2013 - 02:34 AM
They usually came fairly fast for me, but I never made a test using two different computers...and I later found out that you should always use NetworkViews for position synchronizing and such.
Supposedly, because RPCs are guaranteed to come in proper order, they'll stop up all other messages until they reach their target. This can cause problems in games with fluid movement, like first/third-person shooters and such, because you're going to be pinging the movement a lot. So you should use NetworkViews in that case, because you usually won't need the "guaranteed delivery" of RPCs.
Here's what "Dave Carlile" on Unity Answers told me when I was asking about RPCs in an FPS game a few months ago:
"...since RPC calls are guaranteed for both delivery and order, if one is missed they all queue up on the client while it waits for the missed one to be resent. This can cause some bad moments of lag. You should really use the NetworkView synchronization for an FPS game."
However, in something like a turn-based game where you aren't constantly calling RPCs, you may be able to use them instead.
How slow are you talking, though? If it's something like 2 seconds, then there may be some other problem, because I remember getting RPCs fairly quickly in my testings (though I was testing with both clients and the server running on the same computer, so maybe that's why).