- Home /
Assigning varaibles to prefabs
Ok so i have a 'player' prefab and a 'Tank' on the scene already. Im using the networking tutrorial made by unity ot create a multiplayer part to my game. Only problem is hwne i spawn my 'player' the variables he uses such as the 'Tank' 'TankCamera' and a GuiText attached to the tank are not there. Is there any way to assign them on connection?
Thanks in advanced
Comment
Answer by AliAzin · Aug 20, 2010 at 07:57 PM
you can assign these variables to your player after spawning. you can do this by something like : [GameObject.Find()][1]
or [GameObject.FindWithTag()][2]
;