Hi Everybody,
Need some to explain to me what is the difference between InvokeRepeating & Invoke and how can they be used? Is InvokeRepeating only used in the Start function or can it be used anywhere. Help much appreciated.
Hi Everybody,
Need some to explain to me what is the difference between InvokeRepeating & Invoke and how can they be used? Is InvokeRepeating only used in the Start function or can it be used anywhere. Help much appreciated.
You can use either function anywhere.
InvokeRepeating keeps calling the function every n seconds until you stop it.
Invoke calls a function once after a delay.
Check out this article on Unity Gems - it has a section on making things happen in the future.