So I have this Coroutine:
How do I stop a Coroutine
Code (CSharp):
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class EnemySpawner : MonoBehaviour
- {
- [SerializeField]
- private GameObject Tatar1Prefab;
- [SerializeField]
- private float Tatar1Interval = 3f;
- // Start is called before the first frame update
- void Start()
- {
- StartCoroutine(spawnEnemy(Tatar1Interval, Tatar1Prefab));
- }
- private IEnumerator spawnEnemy(float interval,...