NetworkServer.SpawnWithClientAuthority Doesnt work with Host connection

Hello everyone, I am having some issues with NetworkServer.SpawnWithClientAuthority not giving the client that is hosting the multiplayer game authority (“hasAuthority” returns false). Essentially i want a connection object that is my localplayer, and then i want to spawn an object that said localplayer has authority over, so i can destroy the object, and not lose my connection.

If i host a stand alone server, and connect all my clients, it works perfectly. If a client hosts the server, said client is broken due to not having authority.

Is this normal behavior?

1 Like

Here’s my SpawnPlayer command:

    [Command]
    void CmdSpawnPlayer()
    {
        GameObject player = Instantiate(m_PlayerTank);

        NetworkServer.SpawnWithClientAuthority(player, connectionToClient);

    }
1 Like