nasıl yapabilirim
kod
public GameObject mob;
public float spawn = -2f;
private float time;
// Update is called once per frame
void Update()
{
time -= Time.deltaTime;
if (time < 0)
{
Vector2 pos = new Vector2(Random.Range(14.4f, 14.4f), Random.Range(5.5f, -5.5f));
Instantiate(mob, pos, Quaternion.identity);
time = spawn;
}
}