- Home /
Invoke Function by Ui Button
Good Evening, I would like to invoke a function after you press the button, I tried every way but it does not work. Do you have any idea?
This is my script
public void ResumeGame()
{
anim.SetTrigger ("NoPausa");
Invoke ("ResumeGAME",0.84f);
}
void ResumeGAME ()
{
PausePanel.SetActive (false);
Time.timeScale = 1.0f;
paused = false;
}
After several tests, it seems that fails to invoke the function, I tried but it does not work the same with coroutines
What does not work?
Have you called "ResumeGame" method from button?
I usually put Debug.Log statements to check program flow. Try putting Debug.Log in both the functions.
Answer by dr3th · Mar 18, 2015 at 06:31 AM
Wait x seconds has been answered before, check out the link.
Your answer
![](https://koobas.hobune.stream/wayback/20220613190432im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Time goes to fast for the code. (C#) 2 Answers
I need to prevent my scroll bar from moving the camera behind the panel 2 Answers
Pausing Music 1 Answer