Search Issue Tracker
By Design
Votes
0
Found in
5.5.1f1
Issue ID
902378
Regression
No
Random.value does not return 0.0f or 1.0f
To reproduce:
1. Open attached Unity project "randomvalue.zip"
2. Open "doesnotreturn" scene
3. Go into Play mode
Expected result: By description, Random.value should include values from 0.0f to 1.0f [inclusive] , which means it should be possible to get 0.0f and 1.0f as a Random.value,
Actual result: it is impossible to get either of these values in any version of Unity.
Note: I attached a project which has a script. In that script I have made a loop that is generating random.value until it reaches either 0.0f or 1.0f.
pressing Play freezes Unity, which means that the loop is infinite which means Random.value never gets a value of 0.0f or 1.0f.
Reproduced on: 5.5.4p2, 5.6.2p3, 2017.1.0p2, 2017.2.0b4, 2017.3.0a1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment