2
\$\begingroup\$

Please imagine a turn based multiplayer game. Right now there's no lobby in place and connections are established using Unity's Network Manager HUD.

Now on the server, how can you get a list of all the match participants? Preferably ordered - something like the player on the host should be player 1, the first player who joined the match should be player two, the second player who joined should be player three....

Any advise is welcome, thank you.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

as long as you are inheriting a network behavior you can run a check if (isLocalPlayer) add to list. Or you can override the OnStartLocalPlayer ()

public override void OnStartLocalPlayer()
{
    //Add To Player List
}
\$\endgroup\$
1
  • \$\begingroup\$ Thank you! That would work. At the end I've decided to first implement the lobby. \$\endgroup\$ Commented Dec 14, 2017 at 16:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .