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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

What's the difference between maxConnections = 0 and = -1?

Discussion in 'Multiplayer' started by nafonso, May 1, 2008.

  1. nafonso


    Aug 10, 2006
    I can't figure this one out. By the docs it says that:
    Well, I understand the part of no new connections can be made, it makes me think that nobody will be able to connect. But the second part, what the hell does that mean?! Existing ones stay connected?! They don't get kicked out?!

    Also, the first part doesn't work. If I set to 0, other players can still connect!

    Now for the second part of the maxConnections definition:
    This, although kind of confusing, makes me think that it will only allow back a player that was already connected (e.g. lost connection and tried to join again).

    However, if I set maxConnections to -1, I get exactly the same behaviour that with 0! A player that wasn't connected will still connect. Is this because I'm testing it with two instances of Unity running in the same computer (he assumes that the new player was "already connected" and lets me connect again)? Is this a bug? Or am I simply misreading the whole documentation?

  2. AngryAnt


    Keyboard Operator Moderator

    Oct 25, 2005
    Sounds very likely. Launch a webplayer and get a friend to verify this.