dantepw

Grid Unity

Nov 28th, 2014
484
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     private Vector3[,] spawnGrid = new Vector3[3, 4];  
  2.  
  3.     void SpawnGrid()
  4.     {
  5.         for (int i = 0; i < 3; i++)
  6.         {
  7.             for (int j = 0; j < 4; j++)
  8.             {
  9.                 spawnGrid[i, j] = new Vector3(x, 0f, z);
  10.                 GUI.Box(new Rect(10,10,300,300),spawnGrid[i,j].ToString());
  11.                 z -= 1;
  12.             }
  13.            
  14.             x += 1;
  15.             z = 1.5f; //gives original value back to Z.
  16.         }
  17.     }
RAW Paste Data