- Home /
Using OnMouseDown to send RPC, along with ID of clicking player
I'm brand new to networking, and I'm making a 2 player card game.
I've got a deck of cards with a collider on it, which I'm using to detect OnMouseDowns. In there, I call the Deal() function (an RPC), which deals all the cards to both players. My issue is that I only want one player to be able to deal, so if the non-dealer clicks on the deck, nothing should happen. How can I send the ID of the player who clicked on the deck to the RPC Deal() call, so that the server can check if they are the current dealer?
Your answer
![](https://koobas.hobune.stream/wayback/20220613145903im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Network.Instantiate doesn't update in Hierarchy? 0 Answers
[Network] Serialize or not to Serialize? 1 Answer
Unity 5.0.2 iOS IL2CPP Networking RPC Issues 1 Answer
Did not find target warning when using uNet 3 Answers
RPC and how to talk to clients 0 Answers