- Home /
Question by
HunterHarris · Nov 21, 2013 at 01:26 AM ·
gameobjectinstantiatephoton
Multiplayer game, object instantiated is being added for every single player
I am using photon networking for my multiplayer game.
I am instantiating an object in my game, and the object is getting added under each and every player.
If I have 10 players in a scene, and I instantiate an object, the object will be added 10 times.
Heres my code, even though I'm fairly sure its useless. I think this should have a simple solution.
Instantiate (Resources.Load ("Arrow"), transform.position + transform.forward * 2 + Vector3.up *2, transform.rotation);
Comment
Answer by supernat · Nov 21, 2013 at 05:14 AM
This means that the script that contains the code above is being run for each player, or that's what I would believe to be happening.