Skip to main content

Debug Randoms

For more context on how Luna Replay handles randoms, please check out our documentation.

Luna Replay provides a debugging feature to help you identify what may be causing the sequence of random numbers in your game to change between capture and replay.

Debug Randoms mode

The Capture and Replay UIs contain a checkbox to debug randoms, depending on which mode you are currently in.


When enabled, each call to UnityEngine.Random or System.Random will be be printed to the Unity console, along with a full stack trace to help you identify where it is being called.

Building a Linux build whilst debug randoms is enabled in Replay mode, will print all random logs to the logfile, available in Luna Create Hub (more info here).

With the full stack traces for your capture and replay, it will be possible to identify where the discrepancies occur, and isolate the issue. You can refer to our documentation for how to treat certain cases.