Quantcast
Viewing all articles
Browse latest Browse all 11

Answer by LukaKotar

Update() is not coroutine, and I don't think you can change that. You could try making a 'while' loop in an IEnumerator. Start the coroutine in Start(), and the 'while' loop will cause it to repeat over and over again. void Start () { StartCoroutine("Example"); } IEnumerator Example () { while(true){ //this makes the loop itself yield return new WaitForSeconds(2); //do stuff //if you want to stop the loop, use: break; } }

Viewing all articles
Browse latest Browse all 11

Trending Articles



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