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
- Prefab Override popup displays on wrong monitor when Inspector width is resized to minimum
- Scroll View is not moving by inertia after scrolling by click and dragging when Editor window is minimized and Canvas "Render Mode" is set to "World Space"
- "type mismatch error" occurs when the currentDirectionWS output of a Sample Water Surface node is connected to a float3 input
- URP Material Upgrade utility does not enable Alpha Clipping when material had Rendering Mode set to Cutout
- Particle System emission ignores the Sprite Atlas when using a Material that has the "Include in Build" setting unchecked
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!