OnCreatedRoom not being called after JoinRandomOrCreateRoom

Options
Hi,
OnCreatedRoom not being called after JoinRandomOrCreateRoom even though it creates a new room,
OnJoinedRoom is being called though.

Answers

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited August 2021
    Options
    Hi @Ariel,

    Thank you for choosing Photon!

    Yes, this is by design.
    JoinRandomOrCreateRoom is followed by JoinRoom.

    You could use ActorNumber and PlayerCount as a hint.
    If both are equal to 1 you may conclude it's a room creation.
    Actually only ActorNumber matters but you need to make sure the OnJoinedRoom is not following RejoinRoom.
  • Ariel
    Options
    Hi @JohnTube ,
    Thanks for answering. :smile:
    I don't see how that makes sense but I can deal with it.
    But perhaps JoinRandomOrCreateRoom's documentation should be updated in that case, as it states the following:
    "...Either IMatchmakingCallbacks.OnJoinedRoom or IMatchmakingCallbacks.OnCreatedRoom gets called."
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    We will fix the documentation thanks for pointing that out.