To know if a unreliable function got executed or not.

Hello everyone…

I got a Unreliable RPC function that is called on the server something like this



UFUNCTION(unreliable, server)
virtual void UpdateValue();

Unreliable functions don’t get call if there is a problem with the connection or if it is too slow.
Is it possible to know if the function got called on the server or not?

If there was a reliable way to know, then you would need a reliable RPC that lets you know whether the unreliable call happened… Which kind of defeats the purpose, don’t you think? :wink:

Well I thought something like a replicated variable on the server which lets the client now. But well, that also kind of defeats the purpose.

Though I haven’t actually verified that this is the case in UE4, reliable vs. unreliable RPCs are usually a matter of sending through TCP or UDP. The former provides handshakes and validation that a packet did indeed make it through, wheras the latter is much more lightweight, with less overhead but no way to know if something was dropped along the way.

Basically what I am trying to do is, on the client side I got a variable whose value I want to update on server. The value changes nearly every 0.05 seconds or so.

But, it is not really important to send it to server every tick however it would be better if it is sent. So I want to try to call a unreliable function every time the value changes to update it on the server.

Incase its value has not been updated in the last 2 seconds, I want to use a reliable function to update its value.

Is it possible to predict the value, interpolate when you get new information, and then just send fewer (Reliable) updates?