PLIS HELP ME HOW TO SPAWN ENEMY UNITY PLS PLS code example
Example: spawner unity 2d
using UnityEngine;
public class Spawner : MonoBehaviour
{
public GameObject Object;
float timebtwspawn;
public float startTimeBtwSpawn;
void Update()
{
if (timebtwspawn <= 0)
{
Instantiate(Object, transform.position, Quaternion.identity);
}
else
{
timebtwspawn -= Time.deltaTime;
}
}
}