title: Unity3d UNET - SpawnWithClientAuthority doesnt have authority when host
body: <p>I am having issues with SpawnWithClientAuthority when "hosting" a match with UNET in UNITY3D. If i create a stand alone server, and connect clients to it, everything works perfectly. If I host a game, where i am also a client, then for what ever reason the hosted client doesn't have authority (hasAuthority is false).</p>
  
  <p>In my game PlayerObject represents my players connection, and TankPlayer is my physical player (the thing i need authority over--to do things like enable its camera).</p>
  
  <p>Here is my spawn code:</p>
  
  <pre><code>[Command]
  void CmdSpawnPlayer()
  {
      GameObject player = Instantiate(m_PlayerTank);
  
      NetworkServer.SpawnWithClientAuthority(player, connectionToClient);
  
  }
  </code></pre>
  
  <p>This should spawn a tank from my m_PlayerTank prefab (it has "client authority checked). Here are my inspector objects:</p>
  
  <p><a href="https://i.stack.imgur.com/TgEnQ.png" rel="nofollow noreferrer">NetworkManager inspector</a></p>
  
  <p><a href="https://i.stack.imgur.com/0D91h.png" rel="nofollow noreferrer">PlayerObject</a></p>
  
  <p><a href="https://i.stack.imgur.com/24i5t.png" rel="nofollow noreferrer">_PlayerTank</a></p>
  
  <p>Is there a way to make sure the host client has authority in my scripts? Here is where i am checking the authority:</p>
  
  <pre><code>new void Start ()
  {
      base.Start();
  
      if (hasAuthority)
      {
          m_Camera.gameObject.tag = "MainCamera";
          m_Camera.gameObject.SetActive(true);
          Debug.Log("auth");
      }
      else
      {
          Debug.Log("No auth?");
      }
  </code></pre>
  
  <p>}</p>