[UNITY PUN2] Sending network data when Time.timeScale is at zero

In my game, when the round ends, I set Unity's timeScale to 0 to freeze the background and overlay a UI. When the master client, presses continue I use PhotonNetwork.LoadLevel. However, this level change is never communicated to the other clients. I've tried using RaiseEvent to tell the clients to reset their timescale back to 1 and I've tried using RPCs. Is there any way to send network data while Time.timeScale is zero?

Thanks in advance!

Comments

  • I am having this same issue. In my case, I am starting out a loaded level as paused(0 timescale) until all players are loaded. But player properties are not synchronized when Time.timeScale is 0. I'm not sure, but I think this used to work in PUN 1.
  • Any workarounds for this issue?
  • jRocket said:

    Any workarounds for this issue?

    It's not ideal, but I set the time scale to a 0.01 and then back to zero every couple frames to check for any network changes. I'm fairly certain that a previous version of PUN2 didn't have this issue. Hopefully, a PUN2 dev will look into a proper fix.
  • JohnTubeJohnTube mod
    edited May 21
    Hi @TheSLAP,

    Thank you for choosing Photon!

    What is not working exactly when Time.timScale is set to zero? (Level sync, is that it?)
    What is the expected behaviour and current behaviour?
    How can we reproduce with minimal steps?

    Is there any way to send network data while Time.timeScale is zero?
    Actually PUN uses Time.realtimeSinceStartup which is independent from Time.timeScale. See "PhotonHandler.cs".

    Hi @jRocket,

    But player properties are not synchronized when Time.timeScale is 0
    How do you set player properties? and what made you say this and come to this conclusion? how did you test this?

    --

    What PUN version and Unity version do you use to reproduce this?
    Does this happen in editor and in build? which platforms?
Sign In or Register to comment.