Seeded FMath::Rand

You must Initialize the stream like this to have new seed or it will always use seed zero

FRandomStream Stream(FMath::Rand());

than use it to create random stuff

int

Stream.RandRange(0,999)

float

Stream.FRandRange(0.0f,1.0f)

bool with weight

UKismetMathLibrary::RandomBoolWithWeightFromStream(Weight, Stream)

to re generate the seed use

Stream.GenerateNewSeed()
1 Like