Quantcast
Channel: Questions in topic: "invokerepeating"
Viewing all articles
Browse latest Browse all 220

Coroutines or InvokeRepeating

$
0
0
Which one of these would you recommend if you would have something happen every second:
1. Start a coroutine in Start() and use while(true){ yield return new WaitForSeconds(1f); } in the coroutine
2. Start a coroutine in Update() and not use while(true)
3. Use InvokeRepeating

Is anyone more performant than the others, or better practise? Is while(true) a bad way to make something happen over and over again? Thank you!

Viewing all articles
Browse latest Browse all 220


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