Issue of method, termination and relaunch of InvokeRepeating Unity 5



  • There are several methods in the C# violin that are triggered through InvokeRepeating. If one of these methods is called, the InvokeRepeating will stop and be summoned by hand the next time the dog wakes up. How do you do that?



  • InvokeRepeating to be interrupted https://docs.unity3d.com/ScriptReference/MonoBehaviour.CancelInvoke.html

    If you call me CancelInvoke() Without parameters, all challenges will be eliminated Invoke in this violin.

    To cancel a specific Invoke - the name of the method to be interrupted.

    For example, the launch was:

    InvokeRepeating("RespawnCreatures", 0, 3);
    

    a It may be cancelled as follows:

    CancelInvoke("RespawnCreatures");
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2