Search Unity

NetworkDiscovery Demo for 5.2?

Discussion in 'Multiplayer' started by Muckel, Sep 12, 2015.

  1. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    Hello,
    i'm looking for a simple Demo that shows how to work with NetworkDiscovery in the new 5.2 release.
    Many thx
    M.
     
    desafas likes this.
  2. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
  3. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    thank you!
    well it's too simple now... i don't get it ;-)
     
  4. rishi-ranjan

    rishi-ranjan

    Joined:
    Oct 7, 2015
    Posts:
    22
    Hi,
    I want to integrate the NetworkDiscovery to 2dshooter sample to achieve following:

    1. Remove the NetworkManagerHUD GUI
    2. Start the server to start broadcasting.
    3. Start a client to listen for broadcast messages
    4. Client should connect automatically to the server and join the game.

    I added NetworkDiscovery script with NetworkManager object. Client connects to server but the game scene does not transition to Online Scene. I have "Use NetworkManager" selected in NetworkDiscovery.

    Can someone help me with how to get this working?

    Thanks,
    Rishi
     
  5. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
    re-add the NetworkManagerHUD GUI.
    change the OffsetX of the NetworkDiscovery to 300
    run host:
    - start as host
    - initialize broadcast
    - start broadcasting

    run client:
    - initialize broadcast
    - listen for broadcast
    - IP of host should appear, click button to join the game
     
    rishi-ranjan likes this.
  6. rishi-ranjan

    rishi-ranjan

    Joined:
    Oct 7, 2015
    Posts:
    22
    Hi,
    This works.

    Thanks,
    Rishi