Yep, another noob networking question.
My clients pass data to the server via the command attribute, and is stored on a gameobject that is only on the server. What I want to do is have the server return a variable, such as a Color, transform, string, GameObject, etc, down to the client (just one client, not all of them) whenever the client requests it. I have tried clientRPC, however, as far as I know, clientRPC methods cannot return variables. I have looked into server messages, but that looks a bit messy to be the only way to do this.
For example, I store the positions and teams of the player on the server gameobject. When a client joins, it sends a request to the server to add it to a team, and the server adds it to a team in a playerlist gameobject. Now, I want to be able to have the client auto aim towards the closest player that is not on their team. So, the client needs to request information (the transform of a random player on another team) from the server gameobject. Please note that I will not need to request the information every update, so there won’t be too many server calls.