How can the Server send a message to a single Client?

I'm trying to send an Rpc, or any sort of message, to a specific client instead of to them all.

I'm completely at the loss trying to associate a NetworkConnection with its own authoritative spawned player (from playerPrefab).

If I let the NetworkManager auto-spawn it, then I don't know how to get the connection from the player object.

If I override OnServerReady and I spawn it myself, then it has no authority on the client and I don't know how to give it.

I've browsed all sort of documentation but I couldn't find anything useful. Obviously there must be a way to do that, but I really can't find it.

• I haven't worked in Unity before but couldn't you have the message include a user id when it's user specific and then only serve it to the user that matches? – Jade Aug 27 '15 at 21:55
• @Jade "and then only serve it to the user that matches" that's what I'm asking. – o0'. Aug 28 '15 at 16:53
• When a user logs in you keep track of their userID. Then when you read messages off the stack you see if it has no userID (meaning it's open to everyone) or if it has a userID then you compare the current user with the ID on the message before you send it to them. This same idea applies when you're using channels -- only show messages to users that are in the same channel as the one on the message. – Jade Aug 28 '15 at 19:13
• At least that's what I do on SmartFoxServer – Jade Aug 28 '15 at 19:14
• @Jade I'm sorry, on paper it's obvious and easy, I'm glad you're trying your best to help, but if you do not know UNet I don't see how generic advices, however correct, can help me in this situation. I hope you understand? – o0'. Aug 28 '15 at 20:21

What you want is NetworkServer.SendToClient or NetworkServer.SendToClientOfPlayer. You'll want to read up on Network Messages, and then check out NetworkServer here.