Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static List<Transform> instances = new List<Transform>();
- public Transform cube;
- // Use this for initialization
- void Start () {
- for (int i =0;i<5;i++)
- {
- //creates objects with greater distances apart
- instances.Add(Instantiate(cube, new Vector3(i * 2.0F, 0, 0), Quaternion.identity));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment