Why do we use yield return + new not the yield return only?

I have a question about when and why I need to put “new” after “yield return”, the lecture only said that yield return + SomeCondition but actually I need to add “new” to my syntax to make it work with WaitForSeconds method

Thank you,

Hi,

Welcome to our community! :slight_smile:

Did you test your idea? Did it work?

It didn’t work, but idk why and when I should put “new” in it…

What exactly did you test? Could you please share the line(s) of code here?

Privacy & Terms