UKismetMathLibrary::ResetRandomStream
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Resets a random stream back to its initial seed, so the next draw reproduces the same sequence of values as when the stream was first created.
Caveats & Gotchas
- • Takes Stream by const reference (not UPARAM(ref)) yet still mutates it via FRandomStream::Initialize — the Blueprint node still requires and mutates the variable pin despite lacking the usual ref styling in some engine versions.
- • Resets to the stream's InitialSeed, not to a fresh random seed — use SeedRandomStream if you want a genuinely new, unpredictable sequence instead.
Signature
static void ResetRandomStream(const FRandomStream& Stream) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Stream | const FRandomStream& | The random stream to reset back to its initial seed. | — |
Return Type
void Example
Replay the same sequence for a rewind feature C++
UKismetMathLibrary::ResetRandomStream(ReplayStream);
// Subsequent RandomXFromStream calls on ReplayStream now reproduce the original sequence Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?