Added: 1 year ago
From: prime31studios
Views: 653
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (3)

Sign In or Sign Up now to post a comment!
  • while (startTime < endTime) ?

    This is an infinite loop, probably not intentional.

    Loving the series, coming from a C++ background I have been muddling through using C# like C, it's really great to see explanations of these other features.

  • I don't like the idea of calling these coroutines much, because it doesn't appear that they have pausing in mind. I've mostly been using events to listen to when pausing and unpausing happens, and enabling scripts based on this. So I've been making very little use of yield. StopAllCoroutines seems like the only other option, but maybe I don't want to stop all of them. I'd love to see a video about how you deal with pausing in an advanced C#-kinda way. Thanks for a great series so far!

  • @JessyUV Coroutines are incredibly useful so don't write them off just yet. There are definitely ways to pause, resume, delay, etc coroutines that is actually pretty easy to implement. StopAllCoroutines is a bit heavy for many real world scenarios when you have many coroutines going about their business but it is handy for simpler cases. Perhaps the next video will have some tidbits on that front...

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more