Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

how to say that in c# ?

$
0
0
hi
i want to say that
every time the transform .position.z increase by 500
Spawn The prefabs
i know my script is tottaly wrong
but i just want to know how to say it in correct format ?

Code (CSharp):
  1. void Update ()
  2.     {
  3.  
  4.         for(transform.position.z +=500)
  5.         {
  6.  
  7.             if ( x == true)
  8.                 Spawn()  ;
  9.             else
  10.             {}
  11.         }
  12.     }
  13.     void Spawn ()
  14.     {
  15.  
  16.  
  17.         Instantiate(obj[Random.Range(0,0)],renderer.bounds.center, Quaternion.identity) ;...
how to say that in c# ?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles