Hi guys,
Does anyone happen to know how exactly this works on the background and if it is ok to do:
float one;
float two;
float three;
float four;
float five;
void Update()
{
one = Random.value;
two = Random.value;
three = Random.value;
four = Random.value;
five = Random.value;
}
I need to random bunch of variables in one single frame. When I do it like above and print them, they all seem to random different values and all seems ok.
But I heard that since the Random is depended on the clock, randoming in one frame may produce same results… This doesn’t happen in my test but I would still like to verify if it’s ok to leave the code like this.
If this is fine, then what’s the rumor about randoming multiple times in one frame?
Thanks!