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.

How to setup a test network?

Discussion in 'Multiplayer' started by bigkahuna, Jan 22, 2008.

  1. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I'd like to set up a test network so I can learn Unity's networking capabilities. Where do I start? I searched the docs and samples and came up empty handed. Please, can someone please give me some links or tips?
     
  2. larus

    larus

    Unity Technologies

    Joined:
    Oct 12, 2007
    Posts:
    274
    You don't need two machines to test networking, you can run multiple instances on the same machine. So no physical hardware setup or anything is required to test (just a single Mac).

    First, head to the resource section and download the example project:

    http://unity3d.com/support/resources/example-projects/networking-example

    To play with the networking code I would suggest you duplicate the project folder and open a specific scene in two instances of Unity (using the two folders) and watch what happens when you run the scenes with one as server and the other as a client. The networking manual contains some debugging tips and info on how you can run multiple instances of Unity (bottom of the page):

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

    You can also run one instance of Unity and deploy the project and run that as the second instance. Having both instances inside an editor gives you a better insight into what's happening, IMHO. If you use two Unity instances, and make changes to one instance, its a good idea to duplicate it in the other instance (otherwise unpredictable errors might occur).