- Home /
Photon Network instantiation
Hello Unity community, I am on a quest of understanding the inner workings of PUN and network synchronization. I am making a fps with (rather) slow-moving projectiles and collision based damage infliction. At first I made it so that bullets are instantiated via PhotonNetwork.Instantiate and synced it's position and rotiation using OnPhotonSerializeView. It works fine but I can't help but feel that it's a waste of resources and that it isn't very precise. The next thing I tried is sending an RPC that a bullet was instantiated an doing just Instantiate. It, for some reason, spawns on all instances of the game and my though is that it is because all players have the same script that handles the instantiations. Is this a good way? I feel that this could get wrong very easily, especially that every player must a have a reference of all types of bullets I want to instantiate to do it. I'll post my code if needed but I think there is not much to it. Thanks
Bump, how do you sync values on something instantiated locally?