How to reset Random.InitState(x)

Random.InitState(42);
noiseValues = new float[5];
for (int i = 0; i < noiseValues.Length; i++)
{
noiseValues = Random.value;
Debug.Log(noiseValues*);*
}
}
console log: 0.988, 0.588, 0.436 , 0.343, 0.463
As is known, it always gives the same values. Can I create a different result with the same seed?(like Random.InitState(42) ) Can I reset the random’s memory? Also, I could not grasp what exactly the seed mean. I would be glad if you could explain.

The point of calling Random.InitState with a seed is to reset the random number generator and to put it into one particular initial state based on the seed. When you call InitState with a particular seed, you get always the same sequence of numbers back.

Hopefully you know that you can not generate true random numbers with a computer unless you have special hardware that can generate random numbers based on some external source. All random number generators we use in software are pseudorandom number generators (PRNG). A certain PRNG always generates the same sequence / cycle of numbers. The seed essentially puts you somewhere in that sequence. Most PRNGs have huge sequances.

I’m not really sure what you’re asking or what problem you want to solve. However passing the same seed to InitState will produce the same sequence, always. If you want a different sequence, use a different seed. To get seemingly random numbers the Random class is usually automatically seeded with the current date and time. Of course when you call InitState manually you reset the generator into the same one state based on your seed.