Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Networking Example doesn´t connect

Discussion in 'Multiplayer' started by TobiasLingen, Jul 29, 2008.

  1. TobiasLingen

    TobiasLingen

    Joined:
    Jul 29, 2008
    Posts:
    13
    Hallo to Everyone!

    (Please excuse my bad english)
    I´ve got two small questions, maybe someone can help:

    First: I would like to learn, how networking in Unity works, so I just tried to take a look at the networking example. Because I´ve got only one Mac in here, I "published" the Example and tried to start a connection on vista machines. But it does not work and I don´t know why. :(
    I´ve made simple client-server 2d-games with PureBasic before and some applications in visual c#. They all run perfectly, so it can´t be a broken network. (I also did the Firewall shut down, but with no result...).

    Second: Is there a way to avoid, that the players have to fill in the right IP-Adress of the server? In most games you just click on "Find network games" and you have not to care about IP´s. In Basic there were no way to do it. But maybe in Unity? Would be great! :wink:

    Many thanks to all
     
  2. burnumd

    burnumd

    Joined:
    May 27, 2008
    Posts:
    367
    In regards to your second question, the MasterServer class offers a "lobby" style of connection. You set up and initialize the server as you normally would and then call MasterServer.RegisterHost(). The section on "Registering a Host" in the Master Server Manual has a simple code example that I was able to use successfully nearly as is (I added a GUI text field to set the name and a button to start the server).

    Master server docs: http://unity3d.com/support/documentation/ScriptReference/MasterServer.html