Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Controller : MonoBehaviour {
- public Transform prefab;
- // Use this for initialization
- void Start () {
- for (int i = 0; i < 300; i++)
- {
- float x = Random.value - 0.5f;
- float y = Random.value - 0.5f;
- float z = Random.value - 0.5f;
- Vector3 thisPos = new Vector3(x, y, z);
- thisPos *= 5.0f;
- thisPos.x += -15;
- thisPos.y += -15;
- thisPos.z += -15;
- Transform temp = Instantiate(prefab, thisPos, prefab.rotation);
- }
- }
- // Update is called once per frame
- void Update () {
- }
- }
Add Comment
Please, Sign In to add comment