How can I do a “function Update” every second instead of every frame?
start a coroutine in the Start function where you loop and have a yield that uses WaitForSeconds
Wouldn’t that slow down all the updates since it’s in the Start Function? There’s only one update I want to check every seconds.
Coroutines run independent of anything.
And the coroutine would be waiting all the time till the second has passed, do its job, loop and wait again.
so exactly what you want ![]()
It would be simpler to use InvokeRepeating.
–Eric
1 Like
Yep! InvokeRepeating worked great for me. I use it to make the life energy gui go up or down every second. It was pointless to check it every frame and it was taking too much CUP for nothing on the iPhone. Thanks!