1 floatf = random.value;//returns a random number between 0.0--1.0 inclusive (read-only)2 3Vector3 vec3 = Random.insideunitsphere;//returns a random point within a sphere with a radius of 14Vector3 vec3_2 = Random.onunitsphere;//returns a random point on a sphere with a radius of 15 6Vector2 vec2 = random.insideunitcircle;//returns a random point within a circle with a radius of 17 8quaternion qua = random.rotation;//returns a random rotation angle9qua = Random.rotationuniform;//returns a random rotation angle (evenly distributed) multiple random number distributions will be more uniformTen floatF1 = Random.range (Ten, -);//returns a random number, a random number of int, float, between 10-20 One A -Random.seed = A;//set the seed for the random number generator - //to set different random seed seeds the ///to set the seed of a random number: - ///different seeds produce different sequences of random numbers - ///for the same seed, the sequence is the same every time the program starts -Random.seed =1;//after seed has been set, the sequence of random numbers produced below is the same for each + for(inti =0; I <Ten; i++) - { + Debug.Log (random.value); A}
Small white _unity engine _random