changing a coroutine's argument at the coroutine's runtime?

I’ve got a coroutine that calculates rotation values using a for-loop. This coroutine got an integer as argument which is the speed of the coroutine.

is it possible to change a running coroutine’s argument a runtime using a GUI.Button or something else?


var coroutineArgument : int = 0;
function Start()
function OnGUI()
if(GUI.Button(Rect(Bla,Bla,Bla,Bla),"fast forward");
coroutineArgument = 5;

is this possible somehow?

any help is appreciated

thanks in advance,


Nevermind, i solved the question saving the current counter in a variable stopping the coroutine and starting a new one with the old counter.