Quantcast
Channel: Answers by "Mike 3"
Viewing all articles
Browse latest Browse all 60

Answer by Mike 3

$
0
0
You're destroying the object which starts the coroutine, stopping it from running after the wait Change this line (both times): StartCoroutine(PONG.Goal(1)); to PONG.StartCoroutine(PONG.Goal(1)); So that the coroutine is run on the same object it's interested in Edit, to make it more obvious why: When you start a coroutine, the monobehaviour it's run from is "attached" to it in a way that when the monobehaviour is disabled or destroyed, the coroutine will stop running

Viewing all articles
Browse latest Browse all 60

Trending Articles



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