Callback for when attempting to create a room but room already exists?
Options
I read some suggestions to get the entire list of rooms to check if the desired room name already exists, but I don't want the user to have to download the entire list of rooms.
Is there a callback for when attempting to create a room and it already exists?
Thanks!
Is there a callback for when attempting to create a room and it already exists?
public override void OnPhotonJoinRoomFailed(object[] codeAndMsg)
does not seem to trigger when a room already exists.Thanks!
0
Best Answer
-
Hi @belome,[...] but I don't want the user to have to download the entire list of rooms.
This happens automatically in the background.Is there a callback for when attempting to create a room and it already exists?
Yes, there is a callback that gets called when creating a room fails. Please take a look at the example below:void OnPhotonCreateRoomFailed(object[] codeAndMsg) { // codeAndMsg[0] is short ErrorCode. codeAndMsg[1] is string debug msg. }
5
Answers
-
Hi @belome,[...] but I don't want the user to have to download the entire list of rooms.
This happens automatically in the background.Is there a callback for when attempting to create a room and it already exists?
Yes, there is a callback that gets called when creating a room fails. Please take a look at the example below:void OnPhotonCreateRoomFailed(object[] codeAndMsg) { // codeAndMsg[0] is short ErrorCode. codeAndMsg[1] is string debug msg. }
5 -
Thanks for both answers. Good to know!0