using UnityEngine;
using System.Collections;
public class RandomRadius : MonoBehaviour {
public GameObject prefabs;
// Use this for initialization
void Start () {
for (int i = 0; i < 1000; i++) {
Vector2 p = Random.insideUnitCircle*3;
Vector2 pos = p.normalized*(2+p.magnitude);
Vector3 pos2 = new Vector3(pos.x,0,pos.y);
Instantiate(prefabs,pos2,Quaternion.identity);
}
}
// Update is called once per frame
void Update () {
}
}
只在红色区域内生成