- Home /
Question by
JoelVercitte · Mar 10, 2019 at 10:10 PM ·
multiplayermultiplayer-networkingclient-servercommand
Multiplayer non player objects spawning
I can't spawn bullet for my weapon on this piece of code:
"
[Command]
void CmdFire(){
GameObject bullet = Instantiate(bulletPrefab, gameObject.transform);
NetworkServer.Spawn(bullet);
}
"
the host can see the clients shots and it own, but the client can't see own shots and host shots..
There is a YouTube link for more details on that "issue": https://youtu.be/ROlQDmWNtgE
Comment
Best Answer
Answer by SirOrange · Mar 11, 2019 at 12:42 AM
Make sure you have a Network Transform and Identity on the bullet prefab you are spawning and have also added it to the spawnables list inside the NetworkManager component.