unity cancel invoke code example
Example 1: unity cancel invoke
CancelInvoke("MethodName");
// Cancels all invokes of this method for this monobehviour
Example 2: unity cancel invokerepeating
CancelInvoke();
CancelInvoke("MethodName");
// Cancels all invokes of this method for this monobehviour
CancelInvoke();