Still on Name Server after OnJoinedRoom?
Options
I am getting an error telling me that I can't do an operation (Change Groups (248)) because I am on the NameServer. I am calling this operation out of OnJoinedRoom, so it doesn't make any sense to me that I'd still somehow be on the name server. I could probably fix this by just delaying the call by a short time, but that's really hacky and I would rather not rely on that if possible. Is there something I am missing here? Is there a different callback I need or something?
0
Answers
-
I got something working. I realized that the voice server's connection status is different from the general game connection status. So I just used a coroutine and yielded on the connection with
yield return new WaitUntil(() => PhotonVoiceNetwork.Instance.ClientState == Photon.Realtime.ClientState.Joined);
By putting anything I wanted to do voice related after this check, everything seemed to work as intended.0 -
How about you start with the tutorial? I don't think it will help you to explain random bits and pieces here, when you don't have an overview of the workflow PUN provides...
https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/pun-basics-tutorial
I suggest to read and code-along the tutorial, have a look at the demos in the package and then ask remaining questions.0