[PUN2] RPC takes very long time to update - HELP

Hello.

I just about to release a game with PUN2 and having a major issue with RPC calls.

I am updating a value every time a button is executed, this:

[PunRPC]
private void takeOnePropertyTotal()
{
totalProperties -= 1;
}

On my side it executes immediately, but on the second and third connected computer it takes the:

totalProperties -= 1;

after even MINUTES pass to execute this, which is insane and ruins the logic of the game completely. The computers are connected in the same region even and even on the same internet connect and this does not work.

What should i do?

Comments

  • When such a delay happens, it is usually because the game constantly sends a lot of data and is causing problems. Or any of your clients run into connection issues and messages need to be resent over and over, which is also delaying all further reliable messages.

    You could test this by setting up a minimal project with just a PV and one script on it with the RPC.

    You can send RPCs optionally with the target AllViaServer which means the sending client will also wait until the server passed the message back to it, before the rpc is called.