Is invoke or ienumerator a better method in Unity?

Viewed 36

I sometimes use Invoke and sometimes ienumerator when I want the code to run after a certain wait. but which is a more robust and optimized method? I don't know.

1 Answers

The documentation of Invoke states:

If you need to pass parameters to your method, consider using Coroutine instead. Coroutines also provide better performance.

Related