Home > Enterprise >  Is invoke or ienumerator a better method in Unity?
Is invoke or ienumerator a better method in Unity?

Time:08-21

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.

CodePudding user response:

The documentation of Invoke states:

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

  • Related