Callback when JoinRandomRoom() is full or no existing room.

Options
Is there a callback method when JoinRandomRoom() is full or there is no existing room yet. like OnJoinedRoom or OnCreatedRoom? I only got ErrorCode.NoRandomMatchFound in NetworkingPeers.OnOperationResponse.

Comments

  • Tobias
    Options
    For JoinRandomRoom(), the error callback is: OnPhotonRandomJoinFailed(object[] codeAndMsg).
    Unity only allows one parameter in SendMessage, so this is an array of code and the error message. You can skip the parameter if you just need to react to failing.

    The script ConnectAndJoinRandom might be interesting, as it implements our "default" random matchmaking workflow.

    Tip: All the callbacks are defined in the enum PhotonNetworkingMessage and implemented by a PunBehaviour.
    http://doc-api.exitgames.com/en/pun/current/group__public_api.html#gaf30bbea51cc8c4b1ddc239d1c5c1468f