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

Pre-Compiled Unity3D masterserver!

Discussion in 'Assets and Asset Store' started by riekelt, Jul 19, 2012.

  1. riekelt

    riekelt

    Joined:
    Mar 12, 2012
    Posts:
    44
    Hello everybody.
    I have read many topics about problems with a masterserver.
    And i noticed the Unity3D Masterserver is down...
    So i compiled a masterserver for you guys!
    Just read the readme and you should be fine!

    Code for masterserver configuration is included!

    http://www.mediafire.com/?dqv3dc6f1y8640w
     
  2. SomeGuy22

    SomeGuy22

    Joined:
    Jun 3, 2011
    Posts:
    722
    Works on Mac too?
     
  3. riekelt

    riekelt

    Joined:
    Mar 12, 2012
    Posts:
    44
    No sorry. I will try to make a release for mac.
     
  4. Broken-Toy

    Broken-Toy

    Joined:
    Jan 16, 2010
    Posts:
    455
  5. madpoet0204

    madpoet0204

    Joined:
    Sep 10, 2012
    Posts:
    98
    This is great, Thx!
    I installed the files but where do I define the ip address and other info?

    In Start function in Game?

    Thx for any help.
    p
     
  6. CazicThule

    CazicThule

    Joined:
    Nov 29, 2012
    Posts:
    95
    For those using EC2, make sure to set up the ports in the security group
     
    Last edited: Jan 28, 2013
  7. Spektor0307

    Spektor0307

    Joined:
    Nov 27, 2012
    Posts:
    3
    I am trying to host the Master Server using a Windows instance using EC2, I made sure that all my ports were set inside the security group, but I still get that same error, saying that it can't connect to the master server at "xx.xxx.xxx.xxx:xxxx". Any ideas what else might be the issue?
     
  8. Omidja

    Omidja

    Joined:
    Jul 16, 2014
    Posts:
    19
    i create a sample Scene!
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class Connect : MonoBehaviour {
    5.     // Use this for initialization
    6.     void Start () {
    7.         MasterServer.ipAddress = "xxx.xxx.xxx.xxx";
    8.         MasterServer.port = 23466;
    9.         Network.natFacilitatorIP ="188.136.174.174";
    10.         Network.natFacilitatorPort = 50005;
    11.      
    12.     }
    13.  
    14.  
    15.  
    16.     public string IP;
    17.     public string  Port;
    18.     private bool isClientWorking=false;
    19.  
    20.     void OnGUI() {
    21.         IP = GUILayout.TextField (IP, 16);
    22.         Port=    GUILayout.TextField(Port,6);
    23.                 if (Network.peerType == NetworkPeerType.Disconnected) {
    24.                         if (GUILayout.Button ("Start Server")) {
    25.  
    26.                                 var useNat = !Network.HavePublicAddress ();
    27.                                 Network.InitializeServer (32, 50005, useNat);
    28.                                 MasterServer.RegisterHost ("Omid", "Test", "l33t game for all");
    29.                         }
    30.      
    31.                         if (GUILayout.Button ("Start Client")) {
    32.          
    33.                                 MasterServer.ClearHostList ();
    34.                                 MasterServer.RequestHostList ("Omid");    
    35.          
    36.                         }
    37.      
    38.      
    39.      
    40.              
    41.                         if (MasterServer.PollHostList ().Length != 0) {
    42.                                 HostData[] hostData = MasterServer.PollHostList ();
    43.                                 int i = 0;
    44.                                 while (i < hostData.Length) {
    45.                                         if (GUI.Button (new Rect (100, 30 * i, 300, 30), "Game name: " + hostData [i].gameName))
    46.                                                 Network.Connect (IP, Port);
    47.                                         i++;
    48.                                 }
    49.                         }
    50.                 } else {
    51.                 }
    52.         }
    53.  
    54.  
    55.  
    56. }
    1.i run MasterServer.bat in my System(System1)
    2.and play my game.exe in other system(System2)

    masterserver detect new Server Connection!

    3. i run my game.exe in another system(System3)
    4.and enter System2 IP and Port:50005 and Click on StartClient then The game shows me a game name.
    5.i click on it but dosent work!

    6.i play game.exe in system1 and try to connect to system2 but doesnt work on it too.

    where do i mistake?

    Not : when i create a server on System1(That runs MasterServer) i can connect from other system(2-3) as client