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<Bullet> ().Shoot (gbe);
Destroy (bullet, 1.0f);...
How to syn shoot effect in survival shooter by UNet
[Command]
void CmdShoot ()
{
Transform gbe = transform.Find ("GunBarrelEnd");
timer = 0;
bullet = (GameObject)Instantiate (bulletPrefab,gbe.position,Quaternion.Euler(0,0,0));
bullet.GetComponent<Bullet> ().Shoot (gbe);
Destroy (bullet, 1.0f);...
How to syn shoot effect in survival shooter by UNet