0
\$\begingroup\$

I need some help figuring out how to synch pausing and unpausing the game to other players.

I have a UI button where players can pause using the code I have posted below. Pausing works fine with all the players, however unpausing the game gives me a problem. Only the player who pressed that unpause button successfully unfreezes while other players remain in the paused state.

[PunRPC]
void SetPause(float time) {
    Time.timeScale = time;
}

// this goes to UI button
public void PauseTime(float time) {
    PV.RPC("SetPause", RpcTarget.All, time);
}
\$\endgroup\$

0

You must log in to answer this question.

Browse other questions tagged .