- Home /
Multiplayer client-detect
Hello everyone. I am developing a multiplayer monopoly game (max 4 players) and I cannot find I way to determine which is the client I have to pay money (and so update owned money of right player and so on). Could anyone help me? Thanks in advance! :)
Answer by tormentoarmagedoom · Feb 21, 2018 at 12:37 PM
Hello.
All objects (including clients) have a network ID, which is different for every object.
https://docs.unity3d.com/ScriptReference/Networking.NetworkIdentity.html
You should use this ID to identify every client
Accept the answerr
I already thought about using networkID but I don't know exactly how... I have to send a Command from the client who has to pay to the server and then a ClientRpc from the server to the client who won money? And how to specify the ID of the client to which send the message? I am using networkLobby$$anonymous$$anager.. I read about $$anonymous$$essageBase but maybe there is a simplest way to do that