Sign In Register

How can we help you today?

Start a new topic
Answered

When will RTSession OnReady be called with isReady = false

So when the client connects to the session the server sends the OnReady..

I understand that at the time this happens, other players might not yet have connected, or might already be connected.


But whats the criteria to set the param isReady to true or false?


If isReady is true, doesnt it mean all players are connected? If thats the case, I dont get the explanation:

"This method is called when the RT session has started. Something to note when using this callback is that it's possible for players to be already connected before this callback is triggered, because it's also possible for players not to be connected when this is called.

Therefore, it's not safe to assume that all players are connected to the session if you are using this method to initialize your game."


Than whats the point of the param? When will it be false? Does it mean some server failure to create the session? Means I tried to create a session with invalid config?Means the number of player connected are still bellow the minimum (from match values)?




Best Answer

 Hey Guiliano,

The OnReady() callback is triggered when the state of the SDK changes.
What this means is that it will be 'true' when you first connect to the server, but if there is a disconnection from the server, it will return 'false'.

Does that makes sense?
Sean

1 Comment

Answer

 Hey Guiliano,

The OnReady() callback is triggered when the state of the SDK changes.
What this means is that it will be 'true' when you first connect to the server, but if there is a disconnection from the server, it will return 'false'.

Does that makes sense?
Sean

Login to post a comment