Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4.  
  5. public class Practice : MonoBehaviour {
  6. public float radius = 3;
  7. public GameObject prototype;
  8. public List<GameObject> r;
  9.  
  10. public List<GameObject> Search () {
  11. for (int i=0; i<radius; i++) {
  12. GameObject created = Instantiate(prototype);
  13. created.transform.position =
  14. new Vector3(i, 0, 0) + transform.position;
  15. r.Add(created);
  16. }
  17.  
  18. return r;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement