I was just wondering if I’m only able to use yield return new WaitForSeconds();
for pausing any process or method, or am i only able to use it for IEnumerator()
?
Hi Umayr,
yield return new WaitForSeconds();
can be used for IEnumerator/coroutine methods only. It does not work with “normal” methods.
The best would be to simply test your idea. In most cases, the compiler will tell you if something is possible.
Sadly, yes, it doesn’t work. I guess I’ll have to just stick with coroutines, even though I was hoping for there to be an easier way to pause a normal method. I looked it up and I tested a few, but they all pause the ENTIRE script. So, sticking with IEnumerarator and Coroutine.
Thanks for the help.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.