Say I have something like:
function Update ()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
StopCoroutine("myCoroutine");
StartCoroutine("myCoroutine");
}
}
function myCoroutine ()
{
var t : float = 0;
while (t <= 1.0)
{
t += 0.1;
yield;
}
}
Will the StopCoroutine(“myCoroutine”) reset the “t” variable in the coroutine?? Much Thanks!