Question by
alexbrigham · Mar 17, 2016 at 03:09 PM ·
coroutineupdatecoroutines
Is there a way to check something every frame from within a coroutine?
The perfect solution would essentially be an Update() function that could be used within a coroutine
Comment
why would you want to if Update()
can do it for you? if you can elaborate a little, it's going to be easier to give you meaningful advice.
Answer by See_Sharp · Mar 17, 2016 at 03:24 PM
You could do something like this:
IEnumerator SomeName() {
while (true) {
//magical code here
yield return new WaitForEndOfFrame();
}
}
Your answer
Follow this Question
Related Questions
Unity C# Punching Coroutine not completing 0 Answers
Checking Internet inside a Coroutine 0 Answers
Coroutine stops after disabling gameobject. 0 Answers
Add points every five seconds 1 Answer
Coroutine or While loop that you can reset/add time too? 0 Answers