- Home /
Return object from servers command - Unity Networking
Is it possible to return an object from server to the client when using [Command]
in UNet?
I'm making a Scrabble-like game and want the server to manage the "bag" that contains all the letters, so it would be shared between all the clients. Then wherever a client needs to refill his hand with letters he would call a command, server would return a random letter from the bag to the client.
Is this at all possible?
Yeah the thing about RPCs is they are always send to all clients, right? This is the way I have it setup now, I call a RPC with playerId as parameter and add the letter to the correct player. I was just wondering if there's a better way to do it, since this generates a lot of unnecessary network traffic. The remaining players don't need to know when player gets a new letter.