Search Unity

Custom lobby UI

Discussion in 'Multiplayer' started by Zoford, Jun 9, 2017.

  1. Zoford

    Zoford

    Joined:
    Mar 1, 2017
    Posts:
    13
    Hello, I would like to know how to add my own UI to the Network Lobby Manager component because the default one is ugly and it does not do exactly what I want my lobby to do.
    I just want the player to Enter his or her name in an input field and when they press the join button it adds them to the lobby.
     
  2. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Yes, Two approchaes. Make a CustomNetLobbyManager script that derives from NetworkLobbyManager. Or just a customNetworkLobbyManager that derives from MonoBehaviour. Then hook up the button press. So when you hit the Join Button. You get the name and do whatever methods needs to be called. In the NetworkManager (I have no experiance with NetworkLobbyManager) you would do something like:
    NetworkManager.singleton.startClient() and it would start the client. You just have to interact with the LobbyManager from code rather than let the Unity GUI do it for you.