What I would think you'd want to look into is NetworkServer.ReplacePlayerForConnection() as well as NetworkIdentity.AssignClientAuthority(). I don't have the time to do all the heavy lifting for you, but my thought process is this...



1. Have the NetworkManager auto-spawn some sort of Empty GameObject that can represent the player in the scene.

2.a. When two players connect to the match, some how decide who goes first.

2.b. Whoever goes first is who you need to NetworkIdentity.AssignClientAuthority() for. This will be done on the cube.

2.c. Then you'll need to NetworkServer.ReplacePlayerForConnection(). This will swap the player from being in control of their Empty GameObject, to being in control of the Cube.

3.a. After the player makes their "turn"...you need to use ReplacePlayerForConnect to switch that player back to their Empty.

3.b. Then you need to AssignClientAuthority of the cube to the next player.

3.c. Then you need to ReplacePlayerForConnection for the current player from THEIR Empty to the cube.

4. Repeat steps 3.a through 4 until the game is over.

Click to expand...