How to syn shoot effect in survival shooter by UNet

I’m trying convert the survival shooter to multiplayer version by UNet introduced in Unity5.x, the new network system. But I encountered a problem when spawning the GunBarrelEnd effect(shoot effect) to the client. The code is something like this:
[Command]
void CmdShoot ()
{
Transform gbe = transform.Find (“GunBarrelEnd”);
timer = 0;
bullet = (GameObject)Instantiate (bulletPrefab,gbe.position,Quaternion.Euler(0,0,0));

bullet.GetComponent ().Shoot (gbe);
Destroy (bullet, 1.0f);
NetworkServer.Spawn (bullet);
}
the bulletPrefab is a prefab extracted from the player child object (GunBarrelEnd) ,added a networkidentity component and a networktransform, also is registered in the networkmananger’s spawnable prefab.

But when I call the CmdShoot, the shooting effect( facelight and bullet line) only show in the host, never take effect in the client.

Any on can help? Thx.

the script is a component of the player prefab.

I presume that the shooting effect you’ve mentioned is included in your Shoot function:
bullet.GetComponent ().Shoot (gbe);

It seems that you execute this line on the server only.
Note that NetworkServer.Spawn() only spawns an object on the clients.
If you want the effects on the clients, you probably need to call the shoot function on the clients as well.

Thx, I’ll try.