Search Issue Tracker
Third Party Issue
Third Party Issue in 2023.2.X
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
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
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!
Resolution Note (2023.2.X):
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!