need help with code
i need help with this code.. i want to add info to instantiated prefab.. it works for offline script but it doesn't works in multiplayer mode..
DamageTest bullet = PhotonNetwork.Instantiate(missile.name, Muzzle.position , rotate , 0).GetComponent(); bullet.OwnerColl1 = OwnerColl1; bullet.OwnerColl2 = OwnerColl2;
Answer by ChristianSimon · Jun 01, 2017 at 08:16 AM
Hi,
when applying changes to a script's property you have to synchronize these changes across the network, too. Until now these changes are only applied on the local client who calls the above lines of code. In order to inform other clients about those changes you can use RPC calls in this case, since you already have an object with an attached PhotonView component.
Your answer
Follow this Question
Related Questions
Instantiated gameObject on photon network is null 0 Answers
Get a Insantiate particle system follow a GameObject 1 Answer
NullReferenceException 0 Answers