Quantcast
Channel: Questions in topic: "declare"
Viewing all articles
Browse latest Browse all 78

Declaring a Vector3 variable in C#

$
0
0
Can a Vector3 be a variable? I thought so, but I can't seem to find the correct syntax. How do I make this work? for (float i = 0 ; i < blockX; i++) { Vector3 rowX = (i,0,0); //error on this line Rigidbody instance = Instantiate (block,rowX, 0 ); } This gives me the error: error CS1026: Unexpected symbol `,', expecting `)' I have also tried skipping the declaration and just putting: Rigidbody instance = Instantiate (block,Vector3(i,0,0),0); That gives me more errors though.

Viewing all articles
Browse latest Browse all 78

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>