Quantcast
Channel: Answers by "StaticHS"
Viewing all articles
Browse latest Browse all 70

Answer by StaticHS

$
0
0
You should be assigning the variables after you instantiate it. For example: if(Input.GetKeyDown(KeyCode.Space)){ int playerLevel = 1; GameObject bullet = (GameObject)Instantiate(bullet1, gunPosition1.position, transform.rotation); bullet.getComponent().level = playerlevel; }

Viewing all articles
Browse latest Browse all 70

Latest Images

Trending Articles





Latest Images