Assigning a layer to network instatntiated objects AND it's clone

Hello, I’m using layers on my bullets to sort out friendly fire.
The problem is that when I network.instantiate a bullet and set its layer, the clone that other players see won’t get the layer.

UnityEngine.Object currPrefab = Resources.Load(specialWeaponName);
UnityEngine.Object currWeapon = Network.Instantiate(currPrefab,rigidbody.transform.position,Quaternion.identity, 0);
currSpecialWeapon = (GameObject)currWeapon;
currSpecialWeapon.layer = gameObject.layer;

currSpecialWeapon gets the layer but it’s clone doesn’t.

this is the expected behaviour, you have to sync the layer separately

Ok, thank you for the fast reply. How would such a sync be implemented?

use the networkview on the bullet to send an RPC to all connected players with the layer number. In the RPC set the layer for the bullet on all clients.

Ok I’m starting to understand the mechanics. Does the networkview for the bullet have a handle to all its clones? Or is there another way to find the precise clones?

if you send through a particular networkview, all the clones will receive the message.