I have a code like below
StartCoroutine(“MyFunction”);
function MyFunction()
{
//Some Line of codes
Yield WaitForSeconds(5);
//Rest of codes
}
But during that WaitForSeconds user may press another button which cause another function call.
my problem is that when the other function is called, codes after the WaitForSeconds command do not run.
Can anyone help me to know what the problem is? and also the solution!