Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

IsConnectedAndReady and WaitUntil

$
0
0
Hello,

I noticed an issue using WaitUntil with the PhotonVoiceNetwork.instance.client.IsConnectedAndReady.

The following method log false.
private IEnumerator Init()
{
    yield return new WaitUntil(() => PhotonVoiceNetwork.instance.client.IsConnectedAndReady);
    Debug.Log(PhotonVoiceNetwork.instance.client.IsConnectedAndReady);
}

While the following method log true.
private IEnumerator Init()
{
    while (!PhotonVoiceNetwork.instance.client.IsConnectedAndReady)
        yield return null;
    Debug.Log(PhotonVoiceNetwork.instance.client.IsConnectedAndReady);
}

I think it should work, but don't know why it doesn't.

Thanks for your future answer.

Viewing all articles
Browse latest Browse all 15755

Trending Articles