How to do screen record in unity? I want to record my screen(gameplay) during my running game. That should be play/stop , replay , save that recording on locally from device, open/load from my device (which is already we recorded).

In my game one camera which can capture native camera, and one 3d model.

I wish to record that both and use my functionality whenever i want.

Thank you in advance.

  • \$\begingroup\$ Are you referring to getting this working on just one workstation (ie, to make a trailer for your game)? Or, are you adding a recording system that will be usable by all your players? (ie, "Press V to start recording a video to share online!") \$\endgroup\$ – Katana314 Feb 2 '15 at 21:12
  • \$\begingroup\$ I’m voting to close this question because it is a cross-post from stack overflow. Cross-posting on stack exchange sites is not allowed. Please select the site where you think you'll get the most/best answers and post only there. \$\endgroup\$ – Vaillancourt Jan 22 at 0:23

I would suggest you look into Brackey's Rewind Tutorial and improve upon that. One thing you could do is you can store all the positions in a JSON file or your own format when you/player hits stop button and read from that format when replaying, also he is rewinding and not replaying so you need to store the position in reverse order than him, or you can read in different order. He also addresses some limitations with this method like it'd be silly to store game play of more than a few seconds as it takes up a lot of memory to track every object, another thing he addresses is that not every device runs on same frame rate so replays will be different on different devices.

Also here's a wild thought, if your game is not fast-paced than you could record your object's position every x frames and maybe Lerp between those values when replaying? It won't be as accurate but it'll be performant than storing each positional change. By doing this you can probably get around the "different frame rate" limitation cause it'll be same on every device as it's "recreating frames", and with this you can also record more game play as it won't need as much memory.


Not the answer you're looking for? Browse other questions tagged or ask your own question.