[UNET] How to know the connectionID of a player ?

Hello,

Here is my problem : I know that you can spawn a prefab with NetworkServer.Spawn() but I don’t know how to use properly NetworkServer.AddPlayerForConnection() before, to attribute the object to a player.

So here is my question : how do I know the connectionID of a player to use the AddPlayerForConnection ?

Thank you by advance :slight_smile:

NetworkServer.AddPlayerForConnection() takes a playerControllerId. This would be zero unless you have more than one player per client.

Natos, I don’t know the answer, but at irc.freenode.net in the channel #unity3d-unet there are people who might!

In addition, some resources and code snippets are being gathered here:
https://goo.gl/UmBBpM

Best of luck!