Seema Sharma
1
Q:

unity random seed

using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour {
    private float[] noiseValues;
    void Start() {
        Random.seed = 42;
        noiseValues = new float[10];
        int i = 0;
        while (i < noiseValues.Length) {
            noiseValues[i] = Random.value;
            print(noiseValues[i]);
            i++;
        }
    }
}
0

New to Communities?

Join the community