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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

MasterServer.dedicatedServer has no effect

Discussion in 'Multiplayer' started by BitteWenden, Apr 26, 2015.

  1. BitteWenden

    BitteWenden

    Joined:
    Apr 24, 2015
    Posts:
    7
    Hello,

    I'm currently building a multiplayer mod for a game. I already have a server list and stuff like that. The only problem is that the server shouldn't be a dedicated server. (So you start it on another computer and connect to it, not play on it). The problem is that if no one joined so server connectedPlayers is always 1 and playerLimit is always 3 (when I set it to two before). The code for the Server start looks like that:

    MasterServer.dedicatedServer = false;
    Network.InitializeServer(2, 25012, !Network.HavePublicAddress());
    MasterServer.RegisterHost("DefaultGameMode", gameName);
     
  2. BitteWenden

    BitteWenden

    Joined:
    Apr 24, 2015
    Posts:
    7
    Nothing?