Multiplayer Game: Highlighting Object for all players

Dear all,

I am developing a multiplayer game in unity 2049.4.1 and I am using Mirror. I have a player that can move around in the game scene. There are few cubes in the game scene and When I click on the cube it should highlight (highlight: Change material color to Yellow). When local player click on the cube, the cube gets highlighted but it can only seen highlighted by local player camera. Other players have standard gray color. Any idea What can I do to change, so all players can see this cube highlighted, when it is clicked by any player.

Thank you in advance.

You could send a Command on the client’s Player GameObject to the host with an identifier unique to the clicked cube. On the server/host you find the correct cube based on the provided identifier. You then send a ClientRPC on the cube object saying to highlight the cube. On the clients you receive the ClientRPC and actually highlight the cube locally.

1 Like

It worked. Thank you very much.