I'm writing a lock on missile launcher that needs to work across the network. If I can replicate the target GameObject across the network, then the missile can perform all tracking on the client side.
Do GameObjects have a unique identifier that I can serialize across the network or do I have the ensure everything has a unique tag and use that?
You can make your gameobject that spawns the missile spawn the missile on all connected devices and let that missile carry a NetworkView.
What you have to do to make them sync is to let the spawn object set the network view id with an allocated id (The object has to have the same ID on every device to make it work). And then spawn with an RPC Call from the spawn object. You might have to set the owner also…
var viewID : NetworkViewID= Network.AllocateViewID();
networkView.RPC ("SpawnMissile", RPCMode.All, viewID);
Then you can simply let a syncronization handle the objects appearence on all other devices.
Another approach is to use Network.Instantiate witch does a lot of this magic for you and the player who calls Network.Instantiate will automatically become the owner of the missile. Only the owner can controll the missile (Unless you use RPC-calls).
Hope it helps