Search Unity

Third Party UMMORG/Mirror Networking - Moving A Connection From World To Lobby

Discussion in 'Multiplayer' started by F1nch11, Aug 10, 2021.

  1. F1nch11

    F1nch11

    Joined:
    Dec 28, 2020
    Posts:
    4
    Hello! I have been working for some time on a project using the UMMORG framework, which is built on Mirror networking. However, as of recent, I have been having an issue I just cannot solve.

    In my project, when a player character is killed, I want the player to be moved from the game world back to the lobby. Or, in more technical terms, for the player's NetworkConnection to me moved from the Network State 'World' to the Network State 'Lobby.'

    I have tried many times, but have been unable to find a way to do this. The consistent issue is with the player NetworkConnection not being found as a key in the Lobby dictionary. However, attempts to manually add the player NetworkConnection to the Lobby dictionary have failed. I'm assuming that Mirror requires a specific process to move a connection back to the lobby, but I just can't figure it out!

    TLDR: How can I move a NetworkConnection in Network State 'World' to Network State 'Lobby?'

    Thank you so much for your help! I will be checking this thread as often as I can, so if I haven't provided enough information, I would be happy to provide more. I have not changed any of the netcode in my UMMORG project, so if you have found a solution for this in your UMMORG or Mirror project, I would love to hear it! Thanks again!
     
  2. SocialArenaPR

    SocialArenaPR

    Joined:
    Sep 26, 2016
    Posts:
    77
    uMMORPG doesn't contain a Lobby (At least not by default) so I am not really sure what you are trying to accomplish. I don't think Mirror even has a Lobby system. There might be one as a paid addon but not out of the box.
     
  3. F1nch11

    F1nch11

    Joined:
    Dec 28, 2020
    Posts:
    4
    I'm not referring specifically to a lobby system, rather the NetworkState known as Lobby. It's defined in the file NetworkManagerMMO with the following:




    This NetworkState is used after the player has logged in, but before they've selected a character.



    There's also this, which is used to store NetworkConnections in the NetworkState lobby. Looking at it now, a better way to phrase my question might be how to log out a player in UMMORG, while retaining their NetworkConnection.