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!


Thanks for sharing your awesome project! I am a student and I'm trying to apply your tool to my system, but I am now struggling with a few troubles. Do you have any plan to make a tutorial video for this?


I'm glad you are interested! We can put something together for sure. However, it might be a week or so.

Also huge fan of the icon!


Like your's too:)

Thanks for replying. That would be great! I am now having a hard time finding proper codes for input saving. I can playback jump, but movement('w', 's', 'a', 'd') playback is choppy, and not smooth :( . Also, not yet found how to record camera movement too(mouse point part). It is probably due to my lack of programming skills, and I would be so glad if you make tutorial videos for this:).


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.