- Home /
How I can obtein a Int whith the Network ID in Unet?
Im Doing a Boxing game, and when a player loose, I need his ID to share with the server and the other player can celebrate.
Answer by l3fty · Aug 10, 2015 at 10:15 AM
I can't test this at the moment, but if you know the player object of the losing player, you can use playerObject.GetComponent(NetworkIdentity).connectionToClient.connectionID to check that players connection ID. ( http://docs.unity3d.com/ScriptReference/Networking.NetworkIdentity-connectionToClient.html )
Alternatively if you have any message communication with that player, you can always get the connectionID from NetworkMessage.conn.connectionID.
Your answer
Follow this Question
Related Questions
Sending info to/from different networkViews 1 Answer
Update int value with photon rpc? 0 Answers
Get the ID/name of the player that joined the game. 1 Answer
MultiPlayer - NetworkPlayer Event 2 Answers