So I have this code That should stop the coroutine after 10 seconds but it doesn't. What is the problem?
Code:
Code not working
Code:
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,...