how can i stop or exit function while its working?
my code is below
function ChangeColor(){
timer = 0;
RandomNumber=Random.Range(5,9);
yield WaitForSeconds(RandomNumber);
renderer.material.SetTexture("_MainTex", yellow);
cc=1;
}
i want to stop this function or change “waitforseconds” time while the program waiting for “randomnumber”.
for some reason, i just wanna let it finish running this function as soon as possible.
any help would be appreciated
The namepace will auto resolve in most IDEs but it wont contain .dll it will probably be something like
– sacredgeometryusing Newtonsoft.Json;