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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
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!