- Home /
Is it possible to record gameplay via a GameObject Camera and then play that video file in-game? If so, how would I go about doing this?
I'm trying to create an Instant Replay effect which can be paused, rewinded, and slowed down by the player as they wish, however I am not interested in using a "points-in-time" array record system as I feel like it's a lot of hassle involving animation reversing etc. when really I just need to playback the frames that the cam has already seen. I would like to know if it is possible to screen-record what the MainCamera is seeing as the player plays the game, then stop the recording when a button is pushed - and finally, load the video file to be viewed immediately by the player.
As I'd like the player to be able to check the replay whenever they like (replays lasting about 5 seconds), I realise this means I'd need to constantly be recording, maybe even recording multiple times (one starting every second). I thought about taking a series of stills and replaying them (that way eliminating the need to record multiple times, I'd just delete the stills when they get to old), or in reverse if rewinding, but I'm not sure how to do this either.
Any advice would be appreciated! I code in C# but a general idea on how to proceed is more what I'm after with this question rather than code. Thank you.