- Home /
 
               Question by 
               DryTear · Feb 24, 2013 at 05:51 AM · 
                c#instantiatenetwork  
              
 
              Understanding Network.Instantiate
Today i was thinking of ideas for my game:
so i though of adding player pickups, basically when a player dies in the network, an ammo drop will be instantiated across the network. And the first player to enter the collider, gets 15 ammo and destroys the object. Now i want to know more about the Network.Instantiate and also how to use (if youre going to write a script or an example, please in c# because js and c# dont share data with eachother)
               Comment
              
 
               
               
               Best Answer 
               Wiki 
              
 
              Answer by DryTear · Feb 26, 2013 at 11:48 PM
Figured it out my self:
 var prefabObject : GameObject;
 function Update()
 {
     if(Input.GetKeyDown(mouse0))
     {
         Network.Instantiate(prefabObject, gameObject.transform, gameObject.rotation, 0);
     }
 }
Works like a charm!
Your answer
 
 
             Follow this Question
Related Questions
Player 2 not spawning 1 Answer
Network.Instantiate c# issues 1 Answer
Distribute terrain in zones 3 Answers
Photon network issue with script priority 1 Answer
Networking Synchronize Problem. 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                