Hey,
I try to spawn GameObjects from Clients and also from my Host. For that i use the following Code, which is attached to each Player.
[Command]
public void Cmd_SpawnUnit(string go_Name, Vector3 pos)
{
GameObject go = Instantiate((Resources.Load(go_Name, typeof(GameObject))) as GameObject);
go.transform.position = pos;
NetworkServer.SpawnWithClientAuthority(go, gameObject); }
}
i call this Methode from the Player to spawn my GO´s. the Problem is that if i call the methode from the client it spawns double the ammount of objects than it should. It seems like the client is spawning the host´s again too. I allso get this Warning : Trying to send command for object without authority.
thanks for your Help