Abort a JoinOrCreateRoom

Options
Hi,
I want to abort JoinOrCreateRoom request in some situation like a player couldn't connect to a room or nobody joined the room for some time. The PhotonNetwork.leave() would work only if I am connected to a room so I am searching a total abort. Do you have a method that I've missed?

Thanks

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Sonnyboy,

    Thank you for choosing Photon!

    Photon operations cannot be aborted. They either succeed or fail.

    In case of JoinOrCreateRoom, if it succeeds client will be joined to a room. Otherwise client stays on master server.
    in some situation like a player couldn't connect to a room or nobody joined the room for some time

    So you do not need to abort at all since the both cases you mentioned mean that the operation has been completed.
    The PhotonNetwork.leave() would work only if I am connected to a room so I am searching a total abort.

    Just add a check: if joined leave if not do nothing.