Command - RPC - isLocalPlayer help

I have a few questions. I am using the Lan Host lobby GUI supplied by unity. I have a simple game which I am trying to set up as a turn based system. I am having some issues and it is hard to ask the right question.

  1. Is the variable “isLocalPlayer” set to true for the Network Identity who is controlling the player on each instance?
  2. I am trying to use a manager to control whose turn it is. But when the “non-local player’s” turn comes up, I call the command on a script thats attached to the player prefab. I get the error “Trying to send command from non-local player”. So how do i change who is in control and who is sending the commands?
  3. Can someone explain local player authority to me? (Yes, I have looked at the docs… it still doesn’t make sense to me… :frowning: )

  1. The “isLocalPlayer” is true for each playerPrefab on each Client.
  2. You’ll need to use a SyncVar for this most likely. It’s hard to understand exactly what it is you’re trying to accomplish. However, the error your getting is because you can only send Commands to the server from the “isLocalPlayer” GameObject.
  3. Loca Player Authority means that when the object is created, its authority is given to the local player (the “isLocalPlayer” we talked about before). Authority means that changes to its components (transform, rotation, animation, etc) are governed by the local player, or the server.