Jump to content
Unity Insider Forum

Nyen Dev

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Nyen Dev

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Well thank you, I misunderstood the usage of yield return null then. Thank you very much. Since I am on this already what do you write to end the coroutine then? Since you have to yield something
  2. I am pretty confused now, wasnt yield return null to terminate the coroutine?
  3. I know it is the same, just keeps it short. And I do want it to repeat. The flag is changed somewhere else in the code when other conditions are met, and they are for sure. But starting this coroutine instantly kills unity
  4. But that would execute the code just once? I want it to keep on doing doSomething() until the flag is changed from somewhere else.
  5. Why does it put Unity into a endless loop? I am relocating some code from Update into Coroutines, because I think it is just cleaner and resource wise better that way (using if in Update isn't needed most of the time and can be avoided using events and coroutines imo). It puts Unity instantly as the Coroutine is started into an endless-loop state Code is pretty simple while (flag) DoSomething() yield return null; and somewhere i would set the flag to false
×
×
  • Create New...