Skip to content

Conversation

@jankrassnigg
Copy link
Member

This value can be used to initialize things in components with random values, for instance decals use this now to randomly select one of the provided decal assets.

The random seed is either randomly chosen at game object creation time, or it can be fixed (a stable 'random' number). The latter is done by the editor, meaning that all manually placed objects will use a stable seed. Therefore, every decal that was manually placed will use the exact same variation no matter how often the scene is modified or exported.
The former is done for all dynamically created objects, so everything that spawns at runtime will vary truly randomly.

The random seed is propagated through prefabs, so it is now possible that components that are spawned through prefabs vary, but still in a deterministic way, ie. they will be equally stable, if the prefab was instantiated in the editor.

This value can be used to initialize things in components with random values, for instance decals use this now to randomly select one of the provided decal assets.

The random seed is either randomly chosen at game object creation time, or it can be fixed (a stable 'random' number). The latter is done by the editor, meaning that all manually placed objects will use a stable seed. Therefore, every decal that was manually placed will use the exact same variation no matter how often the scene is modified or exported.
The former is done for all dynamically created objects, so everything that spawns at runtime will vary truly randomly.

The random seed is propagated through prefabs, so it is now possible that components that are spawned through prefabs vary, but still in a deterministic way, ie. they will be equally stable, if the prefab was instantiated in the editor.
@jankrassnigg jankrassnigg added this to the Next Release milestone Feb 7, 2021
@jankrassnigg jankrassnigg requested a review from C-Core February 7, 2021 22:33
@jankrassnigg jankrassnigg merged commit 4c587f0 into dev Feb 8, 2021
@jankrassnigg jankrassnigg deleted the user/jk/randseed branch February 8, 2021 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants