InvokeRepeating in unity 3d

how to cancel invoke repeating which i have used in start function?

InvokeRepeating("makeWall", 2, 2);

After reach a specific condition it should stop.

1 Answer

1

you can use

CancelInvoke ("makeWall");

or

CancelInvoke();

Look here for unity docs on this.