I have a few questions about execution order on RPC and replication,
1, Will RPC receiving order keep the same as sending? example like below
Server send RPC1, RPC2 to client ActorA, RPC3, RPC4 to client ActorB, what will be the possible order on the client side? can RPC3 come back earlier than RPC1?
2, With the same set of the replication settings, the fieldA and fieldB on single Actor are ordering update, can fieldB update faster than fieldA?
ONLY Reliable RPC’s will truly garauntee order, and ONLY for the same actor. Connections do not matter. Note that they do not neccesarily arrive in order, but they will be processed in order.
Calling ReliableRPC_1 and ReliableRPC_2 on Actor_A, will always execute in the same order they were called.
Calling ReliableRPC_1 on Actor_A and ReliableRPC_2 on Actor B, they may execute in any order, regardless of how they were called.
Unreliable RPC’s will execute in the order they were called in (since each packet has an ID to identify it’s order) - but only if they do actually arrive, so that’s the crux and probably shouldn’t be relied on so much. I’m not sure if this is true for multicast unreliables since they have some special handling.
Reliable RPC’s cannot be dropped, as if they are dropped the client will be kicked anyway.
Property replication does not garauntee any order, even on the same actor. This is because property replication is lossy, you will not receive every change made to a property, only it’s final state.
@TheJamsh , Thank you, what you saying is exactly the things I learn from my test cases, even the UE source code looks like the RPC message will go to the network layer kind of straightforward, but the result cross two network machine for two Actors are unordered, I didn’t check the network part, I think there is possible more logic in it. @TIANMIN Thank you, do you have the case for multi Actors?
Hey could you elaborate on this last part? If I have a replicated property value and only change it once on the server, not continously, is it guaranteed that the changed value will eventually arrive on the clients? Or can this one single change be lost and the clients assume forever that the value was never changed?