Server only variables
Well... my problem is simple... i have a variable server only, then i use a [Command] te get this value and send to client, but the client always receive empty value... When I print inside [Command] function it shows the right value "sample value", but when i print at [ClientRpc] it always receive "". My question is... [Command] funcions works in the server right? so... why the server sent the value but the client receive empty value?
Comment
Answer by Krahgnatokz · Sep 08, 2017 at 05:58 PM
Command makes the client tell the server to do something. If you want to pass a value from the Server to the clients, use ClientRPC (to send it to all the clients).
Your answer
![](https://koobas.hobune.stream/wayback/20220612123304im_/https://answers.unity.com/themes/thub/images/avi.jpg)