Random Stream variables in the GameMode are reset every PIE.
Workaround is to use Set Random Stream Seed before using the Stream value.
Reproduced in 4.7.6, 4.8.1, and Main (//depot/UE4/Promotable-CL-2610743)
1. Open any project
2. Create a new GameMode Blueprint
3. Set the GameMode as default for the project or level
4. Create a Random Stream variable
5. On Event Begin Play, Random Stream variable > Break Random Stream > Print String
6. Compile / Save
7. PIE
8. Stop
9. PIE
Result:
The number printed resets on replaying
Expected:
The number printed maintains the same value every replay, as it would in an instance of an Actor Blueprint in the level
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.7.6, 4.8.1, 4.9, 4.14 |
Created | Jul 6, 2015 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |