0
\$\begingroup\$

If someone have knowledge on the structure of a Unity multiplayer game with Mirror, i could appreciate some help. I try to make a multiplayer shoot'em up. So i create waves of enemies. I understand it is better to Spawn the wave (a trajectory) Server side, instantiate the enemy and parented it. Then Client side, i instantiate the enemy and parented it with the wave. But after that, i don't find a good way to do things with the enemy server side, and have it done client side. When i move the enemy with a transform, it is instantly done server side, but not client side. I see the ship going up very fast. Any idea of a good communication between child of a Spawn object by the server with his Client side version ?

Thank you

\$\endgroup\$
3
  • \$\begingroup\$ You would not need to instantiate the enemy on both the server and the client, Mirror should do that for you Client side. How do you spawn the enemy? \$\endgroup\$
    – Zibelas
    May 3 at 15:56
  • \$\begingroup\$ I Spawn an enemyWave. Then instantiate an enemy and parented it to the wave. So Client side, the enemyWave is instantiated. Then i need to add the enemy. Since i want different wave/enemy combination, i can't have prefabs with all wave/enemy combination ready to Spawn. \$\endgroup\$
    – nikubik
    May 4 at 9:57
  • \$\begingroup\$ Im not sure if I understand it fully. You can have different enemies per wave but using the same enemy. You mean to parent it to the wave to move them all at once in a certain pattern? Without seeing how you wrote your spawner (aka code), it is hard to tell where it goes wrong. \$\endgroup\$
    – Zibelas
    May 4 at 10:01

0

You must log in to answer this question.

Browse other questions tagged .