Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

StopCoroutine returning Null

$
0
0
I am having trouble with coroutines. I have 2 buttons and a global variable. The global variable is created like this IEnumerator makeBubbles; On 1 button I have this makeBubbles = StarCo(); StartCoroutine(makeBubbles); On my other button I have this: StopCoroutine(makeBubbles); When I click the first button the coroutine runs but on the second button press I get this error: NullReferenceException: routine is null UnityEngine.MonoBehaviour.StopCoroutine (System.Collections.IEnumerator routine) (at <6afd1274f120405096bc1ad9e2010ba6>:0)

Viewing all articles
Browse latest Browse all 2891

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>