📅  最后修改于: 2022-03-11 14:49:04.010000             🧑  作者: Mango
float radius = 1f;
int amountToSpawn;
for (int i = 0; i < amountToSpawn; i++)
{
float angle = i * Mathf.PI*2f / amountToSpawn;
Vector3 newPos = new Vector3(Mathf.Cos(angle)*radius, y, Mathf.Sin(angle)*radius);
GameObject go = Instantiate(GameObject.CreatePrimitive(PrimitiveType.Cube), newPos, Quaternion.identity);
}