public class RocksSpawn : MonoBehaviour
{
[SerializeField] GameObject PrefabRocks;
[SerializeField] int Spawned;
void Begin()
{
for (int i = Spawned; i > 0; i--)
{
SpawnRocks();
}
}
void SpawnRocks()
{
Vector3 SpawnX = new Vector3(Random.Vary(40.2f, -124.75f), -0.58f, (Random.Vary(129.31f, -36.05f)));
Instantiate(PrefabRocks, SpawnX, Quaternion.identification);
}
}
this is the instance. There is a particular space I do not need it to spawn is inside that “SpawnX” I’ve put up, Any ideas what I ought to do? I used to be to place AABB bounds however, no tutorials have on this. Please let me know if there’ different different too.