Search Issue Tracker
Third Party Issue
Votes
0
Found in
2021.3.29f1
2022.3.6f1
2023.1.6f1
2023.2.0b2
Issue ID
UUM-43494
Regression
No
The first returned value from “Random.value” is always ~0.2, and different values are returned when using “Random.value” a few times
How to reproduce:
1. Open the user’s attached “RandomBug.zip” project
2. Enter Play Mode and observe the Console window
Expected result: First value is between 0-1, the first, second, and fourth values are the same
Actual result: First value is always ~0.2, just the second and fourth values are the same
Reproducible with: 2021.3.29f1, 2022.3.6f1, 2023.1.6f1, 2023.2.0b2
Reproduced on: macOS 13.4.1 (Intel)
Note: reproducible in Editor and Standalone Player (macOS)
Comments (1)
-
DasTobi
Jul 21, 2023 08:32
No this doesn't help, because I create a multiplayer game and calculate 3d-models based on the seed. So I can neither use a time nor a mouse position based seed, because then all players would have different models. Also after every new start with the same seed, the models would look different.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
Hey,
on the attached project when calculating seed for the first time, all values are default (just initialized), thus seed is same on each start. to get it better randomized initial value could be either time based or mouse location based value. Applying that, desired functionality should be reached.
Hope this helps!