How to throw RoomNotFound Exception in SharedMode?

Options

I want to connect to custom rooms in SharedMode but when the room key is wrong I dont want the user to create a new session instead I want to tell the user that there's no such room found, Like in Host/Client Topology

Answers

  • Tobias
    Options

    When you try to join a session by name, we assume that usually players try to get into a match that a few players know. So we did away with the "not found" error and create it on the fly. If we don't, then more than one player may try to create it. This in turn will definitely fail (there is no option to join a room, should the create fail due to existing room name).

    The potential for follow up errors is high.

    That said, there should be an option to join a room and not create it, if it doesn't exist. Need to ask a colleague to chime in.

  • ramonmelo
    Options

    Hi @Siddhant ,


    The support to disable the Session creation in Shared Mode will be available on the next SDK Build.

    It will work the same way as for the Client, you just need to set the flag "DisableClientSessionCreation" to "true" when invoking the "NetworkRunner.StartGame" method.

    Thanks for your feedback.


    --

    Ramon Melo

    Photon Fusion Team