Voice chat with lobby

Hello,

We have progressed with our project since last time we asked for assistance here and we are thankful for the help. A quick summary of the project: we are creating a VR multiplayer space with voice chat. At the moment, the project uses the latest version of Photon Voice 2 and PUN 2, and we have updated Unity to 2018.3.1f1.

Voice chat was working pretty well until we recently added a lobby. We are basically using the demo lobby from the AsteroidsDemo for PUN 2 with small changes. The problem shows up when the players create a room, join the room and start the game at the same time. What usually happens is that only the player who created the room can hear the other player. However, if a player creates a room and starts the room alone and the other player joins afterwards then it works as normal.

We suspect that it might have something to do with changing scenes, but we are not sure. Does anyone have any idea about what's happening here?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited January 2019
    Hi @NTNU_VR,

    Make sure to update to Photon Voice 2.2, we have fixed an issue related to scene switching and events timing.

    If this does not help, could you try to reproduce in a Unity version lower than 2018.3?

    ---

    If the issue still persists:

    Do you use the regular/default flow of the PUN2 - Voice2 integration with the audio prefab that has "PhotonVoiceView"?

    Otherwise, set log level to ALL for "Recorder" and "PhotonVoiceNetwork", reproduce then send us logs from the two players.
  • Hello again,

    Yes we have followed the regular flow. Hopefully we have understood it correctly, but we have a player prefab with the PhotonVoiceView. We also have Photon Voice 2.2.

    We have tried it now with two players starting at the same time from a lobby and it produced an error. This seems to only appear if the players start from the lobby at the same time.
  • JohnTube
    JohnTube ✭✭✭✭✭
    hi @NTNU_VR,

    I see, thanks.
    Could you import these updated scripts and try to reproduce again?
  • Hi again,

    We have imported the updated scripts and tried it out. The same error still shows up and the situation is still the same with the host being able to hear others, but other players do not hear anything.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited January 2019
    Hi @NTNU_VR,

    Could you try replacing the contents of Speaker.cs with this then try again and see if the issue persists?
  • It seems to be working! Thank you so much for the help :smile: