Instantiate prefabs on specific network groups only.

Hi, I’m currently working on some fighting multiplayer game where many users login to the server and join different maps to fight each other.

and I’m using network.Instantiate() to instantiate strike effects when my character hits the opponent:

Network.Instantiate(StrikeFx, transform.position, transform.rotation, 0);

But the problem is that when I instantiate this effects prefab, this effect can be seen in other players in different map.

So I want to show this effect only to those players who are in the same map. I guess I can do it using network groups, but I’m not sure how to use it.

Can anyone give me a clue??

I haven’t made my baptism of fire (coming soon…) in Unity Network, so my words don’t have much weight.

But if I were you, I would rather go for RPC, since Network.Instantiate will instantiate no matter what the situation is.

By using a RPC, you are able to do tests before instantiating locally (Instantiate function).

In addition, FX are not especially object that required a precise sychronization.