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
- [Silicon] Crash with multiple StackTraces when entering Play Mode in a project with corrupted FBX files
- Index Out Of Range exception when trying to use Rendering Layer Override in Probe Adjustment Volume without a mask defined in lighting settings
- [Android] [Vulkan] [WebCamTexture] "WebCamTexture.Play" crashes the application when the camera is started
- Huge performance overheads appear when there is a large amount of bindings in the UI Toolkit
- Visual Effects Graph Blackboard can't be scrolled horizontally
Add comment