Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Networking-Master Server

Discussion in 'Multiplayer' started by Mike08, Jan 14, 2008.

  1. Mike08

    Mike08

    Joined:
    Dec 29, 2005
    Posts:
    124
    Hi

    I wanted to know if anybody knows how you can use the Methods RegisterHost and RequestHostList and PollHostList also in an local network. How can I do this.

    I hope someone can help me with this.

    By
     
  2. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I've used UTs MasterServer without a problem for my local network which would require NAT punchthrough if someone wished to access it from outside (locally, it just directly connects locally, though). I just used the examples from the documentation and converted everything to C# to get started, and it was very straightforward (I used the TestConnection() approach, see http://unity3d.com/support/documentation/ScriptReference/Network.TestConnection.html

    It maybe confusing at first, and maybe it's easier to just use the "simple method" (see link below, depends on how comfortable you feel doing programming work), but for me, that was just perfect...

    Maybe start with:

    http://unity3d.com/support/documentation/ScriptReference/MasterServer.RegisterHost.html

    ... and if that doesn't work on your local network, go with the above link doing the "TestConnection()-magic"...

    There's also a few networking examples in
    http://unity3d.com/support/resources/example-projects/networking-example

    Jashan
     
  3. Mike08

    Mike08

    Joined:
    Dec 29, 2005
    Posts:
    124
    Hi

    I think you got it false. I meant I want to use this in a local network with really no connection to the internet.

    By
     
  4. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Ah, ok... Then you can't use UTs MasterServer. If you really want to use these methods, you'd have to create a MasterServer of your own, inside your local network. For more info on that, see:

    http://unity3d.com/support/documentation/Components/net-MasterServerBuild.html

    ... or, just manage the connection stuff yourself (there's examples for that in the networking example project that I've mentioned in the previous posting, that's the last link in that posting).

    Jashan