Search Unity

UNET Local LAN Game Room Discovery

Discussion in 'UNet' started by Gamrek, Jul 2, 2015.

  1. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Hi,

    I spent some time reading the new documentation about UNET and tried to make something work. I have used TNET before which it allows me to create a local LAN game room with names and password etc. Then other people can discover the room when they are on the same wifi network. I don't really see this can be implemented with UNET. (maybe it can with LLAPI, I am not very good at networking.)

    I looked at MatchMaker, that is only works with games with public IP address, or Unity Cloud Game service. Anyone?
     
  2. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574
    Take a look on StartBroadcastDiscovery, StopBroadcastDiscovery, IsBroadcastDiscoveryRunning, SetBroadcastCredentials, GetBroadcastConnectionInfo, GetBroadcastConnectionMessage functions
     
  3. isidro02139

    isidro02139

    Joined:
    Jul 31, 2012
    Posts:
    72
    FYI there is an IRC channel now on irc.freenode.net (#unity3d-unet). Also, some shared resources are gathered here:
    https://goo.gl/UmBBpM
     
  4. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    I wonder this as well. I presume the NetworkManagerGUI buttons that say "LAN" are actually not LAN at all?
     
  5. JesusChrist17

    JesusChrist17

    Joined:
    Sep 17, 2016
    Posts:
    12

    How can i get a list of local hosts?, i am using network manager and network discovery, it works fine by default, but i want to customize the buttons, then i need this list to allow my users click and join on it.
     
  6. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574
    @JesusChrist17 The one option is:
    Your client on start broadcast: I'm new client my ip is my port is, servers please connect to me.
    Then servers who receive broadcast connect to the client and report him ip and ports whihc are listening.
    Then user chose correct server, disconnect all servers, stop broadcast and make connection to server which he selected before...
     
  7. JesusChrist17

    JesusChrist17

    Joined:
    Sep 17, 2016
    Posts:
    12

    but what is the way to set a name on the host ? , people only can see numbers ( ip ) , it could be cool that i can use names.
     
  8. JesusChrist17

    JesusChrist17

    Joined:
    Sep 17, 2016
    Posts:
    12
    Can the client on start broadcast set a name too? , then the server who receive broadcast get the name , ip and port?
     
  9. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574