Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    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

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