[BOLT] How to call OnJoinedLobby event?


I tried to register Photon.Realtime.ILobbyCallbacks to get lobby callbacks but it don't work. I'm not sure if I can use Photon.Realtime stuff with Bolt?

If I start bolt and connect, a log entry "Joined to Lobby" appears, but I couldn't figure out, how I can call custom code.

I was not able to register ILobbyCallbacks.


  • Hello @vampir26 ,

    Photon Bolt uses Photon Realtime underneath to manage the connection with Photon Cloud. Most of the behaviors are not exposed as we need to control some aspects of the connection, which includes the subscription of internal events from the LoadBalancingClient.

    Maybe, on a future version, we will enable direct access to the internal LBC, but this is not planned and we also don't note the need for it so far.

    Can you describe your use case? So we can find a solution that should solve your needs.
  • Hi

    Thank you for your answer.

    I just wish to recognize if the player enter the lobby or already is in it, to show the server browser.

    The SessionListUpdated callback is not reliable enough. It feels a bit random when SessionListUpdated is fired.
  • @vampir26

    It's not random, the callback is invoked when the available sessions changes somehow - when a new session is created, a session is removed or change its parameters.
    You can show the server browser when the Bolt finishes starting (`BoltStartDone()` callback). If for some reason your connection is not able to Photon Cloud, Bolt will shutdown.

    Also, have you checked the new Matchmaking API? https://doc.photonengine.com/en-us/bolt/current/lobby-and-matchmaking/bolt-matchmaking

    Depending on the type of game, you can make use of the Random Join methods and instead of showing a list of games, just join a session that meets some parameters directly.
  • Thank you for your support.

    Yes I know the new Matchmaking API, but I haven't fully tested it.
Sign In or Register to comment.