RandomStream not working on Android?

Hi. In my game, i’ve made a BP that generates the level based on a seed number using RandomStream.

When I play the game from the UE4Editor, everything works. When I change the Seed number, the BP generates a different level.

When I package the game and play it on my Android device, no matter which Seed number I use, I always get the same level.

Does the RandomStream/Seed not work on Android or something?

I’ve packaged my game for Windows (64-bit) to see if the same problem occurs. And indeed, the same problem occurs.

It seems like the RandomStream/Seed does not work once the game is packaged.

Anyone having an idea what it can be?

Everything works in Editor. As soon as I package it (Android, Windows or HTML5) it doesn’t work and keeps using a default seed/initial number.

I was not able to reproduce this issue, I’m guessing you are using version 4.10.(1/2)?

How do you have it set up (have a screenshot/short video)? My basic implementation seems to be working as expected.

Yes, I’m using version 4.10.2 at this moment.

I’ve followed this tutorial: UE4 Tutorial - Random Maze Generator

And everything works in the editor. When I load the map the maze is build based on the seed, when the seed is changed and the map reloads, it’s a new map based on the seed number.

When I package the game, everytime the same map is being loaded no matter how many times the seed number is being changed. As if it’s unchangable…

I did some testing.

It appears like as I expected, the seed number cannot be changed. At least, this is how it results…

The BP that builds the map based on the seed level, cannot read (for unknown reason) the SaveGame file where the Seed level is set by the player (or the game when launching the game for the first time).

The map that it DOES load is based on the Seed set in the Editor before packaging.

In example:
In the Editor, I set the seed the initial seed to “1”. I start the game via the Editor and change manually set the seed to “2”. This is being saved in to the SaveGame.

Then when I press Play and it loads the map containing the BP with the Map (based on the Seed), it builds the map based on the seed number “2”, as it should → LoadSaveGame → Cast to SaveGame → Get SeedNumber → SetRandomStreamSeed.

When I package the game and to the same, the seed number is stuck on “2” as it was set in the Editor. So instead of taking it from the “SeedNumber” variable in the SaveGame it seems to become somehow ‘hardcoded’…