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.