[UNET] How to let both players to handle non player objects?

I’ve tried to find my answer but I couldn’t… It seems like people care less about non-player objects.

The scene I want to make is

  1. There are two players.

  2. There is a button in the middle of a screen.

  3. Player can click the button and the color of the button changes.

My problem is that only server player, who spawns the button, can change the button. Other player can change the color but it doesn’t sync.

I found about network authority but I don’t think that would be answer because assigning authority only supports one player object.

Maybe I’m just going through some critical features of UNET…

1-Set color of button as a sync var
2-Spawn different “control” objects for each player
3-Player sends Command to the “control” object
4-“control” object changes the color button.

It’s also possible to achieve this functionality using network messages.

Wow. I’ve never thought I can get answer this fast. Thanks for a comment.:slight_smile: I’ll try this one.

Hmm… I tried several ways but I couldn’t make it.:frowning: I spawned controller prefab with server only property. Next I linked player prefab, button prefab, controller prefab via ‘public gameObject’

I think I actually don’t know the concept of Commands maybe. Did you mean to activate command function inside of controller such as CmdChangeColor(){ getcomponent of button and change the color }