Record, Save & Playback User Input in Unity

rcarlson profile image Robert Carlson ・1 min read

Last year a couple friends and I built a tool where you can record user input (controller, mouse, keyboard) and save it to a file for the purpose of playing it back.

Our intention for this tool was to capture play-testing and replay user's game sessions. Our thought was this tool would serve to re-create any bugs the player found during their testing.

It works for any Unity game that uses the standard Unity Input library, however it can be adapted to work with any sort of input system.

Instructions can be found at https://github.com/LetsBuildGG/UnityInputReplay


markdown guide

When we were working on this project the biggest challenge was how to synchronize with the Update cycle.

We tackled this by allowing the ability to track any game objects that need to be corrected after each frame. It was an interesting problem to solve, and check out the code to see how we did it!


This is super cool! Thanks for sharing! Did you find that there was any challenge with this as you refactored gameplay elements? Or did this work pretty well from the start of a project to however far it's developed?


We designed it to be integrated into existing games, so ease of integration was our primary goal. As long as you did not refactor your movement controllers in any significant way, the plugin adapted to your game very well, and even if you did it was only a few lines of code needing to change.

I should add that we had plans to allow saving these save game files to a cloud storage container so that you could in theory distribute builds to your play testers, and when they found a bug they could smash a big button on the UI and it would drop their save game file on a server for you to watch back and see the bug in action.