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
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
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!