logancberrypie

Untitled

Jun 27th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1.  
  2. public static List<Transform> instances = new List<Transform>();
  3. public Transform cube;
  4.  
  5.  
  6. // Use this for initialization
  7. void Start () {
  8. for (int i =0;i<5;i++)
  9. {
  10. //creates objects with greater distances apart
  11. instances.Add(Instantiate(cube, new Vector3(i * 2.0F, 0, 0), Quaternion.identity));
  12. }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment