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.

images-small

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

images-large
Building a Linux build whilst debug randoms is enabled in Replay mode, will print all random logs to the logfile, available in Luna Playground (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.