How to check if I have joined a voice room?

Options

I need a callback / property for one of my scripts where I can check if the local player has joined a voice room. I figured I'd just have to check on

PhotonNetwork.InRoom

but unfortunately there seems to be a small delay between when you join a Photon room and and when you actually join the corresponding Photon voice room, which gives me a bunch of warnings inbetween. Unfortunately it doesn't seem like the PhotonVoiceNetwork doesn't support a functionality like that, or have I been missing something?

Answers

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited January 2022
    Options

    Hi @StrikeAgainst,

    Yes there is a slight delay as the voice client follows PUN client and will catch up ASAP.

    You can check if the voice client is in a room using PhotonVoiceNetwork.Client.InRoom.