8

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.

Kay
  • 12,918
  • 4
  • 55
  • 77
Sudhir Kotila
  • 687
  • 9
  • 20
  • There is a free plugin called Everyplay in the Asset Store. Haven't tried it yet but it has good reviews. – Kay Feb 02 '15 at 13:39
  • Thank you Kay, But i want to store that screen recorded video in locally . Because that i want to load that local video again when i want. have you any idea how can i record and load screen as a locally in device ? – Sudhir Kotila Feb 02 '15 at 13:42
  • Everyplay was discontinued October 1st 2018. [Here is the shutdown notice](https://everyplay.com/shutdown-notice.html). – Tiago Martins Peres Jul 14 '19 at 23:33

4 Answers4

5

This is hard to implement, but not impossible. Because every frame or interval you need to capture screen shot of your camera view and store it in the list. You need good, (Smaller interval but not much. Because when it becomes smaller, needs more memory) interval value. If your interval is big raplay can be seen laggy.

While you play game your ram becomes full and os will terminate the app. So you need to fully cover memory optimization. Another solution is assets in Unity Asset store.

EZ Replay Manager can be used. (Keep in mind: I haven't tried it yet.)

Free

Pro

Barış Çırıka
  • 1,570
  • 1
  • 15
  • 24
  • Hi,Baris Cirika i tried EZ Replay Manager but its provides to record game object's position and rotation , i don't want that. I have use native camera in my unity game though that camera i capture something and now i want to record that capturing through my game in local device. So in the my case i don't use any type of positing or rotating objects in my game so EZ Replay Manager never useful for me. – Sudhir Kotila Feb 03 '15 at 09:40
  • So you need to apply my answers first paragraph. – Barış Çırıka Feb 03 '15 at 09:51
  • Thank you so much, but i cant do that cos its too much hard to implements you have any code/demo regarding this? – Sudhir Kotila Feb 03 '15 at 09:56
2

Check out this open-source project: https://github.com/getsocial-im/getsocial-capture. By default our project records Main Camera's rendered content. C# examples are in the repo.

You can record in 2 modes:

  1. Continuous mode - capture last X frames.
  2. Manual mode - capture frames on your own when needed. For example, record a timelapse of the level.

Once the recording is done, you can generate GIF, get raw bytes and do whatever you want. E.g. let your users share that GIF with friends.

Here's the recording of a game session from the test app. The recorded GIF shows up in the end:

GetSocial GIF Capture library, preview via GetSocialCapturePreview

Disclaimer: I worked at GetSocial at the time of writing.

Ostap Andrusiv
  • 4,827
  • 1
  • 35
  • 38
  • Consider editing the question to disclose your affiliation. One can imply from the word "our" and by looking at your profile and plug-in's page, but i think it should be more clear for the reader. – Tiago Martins Peres Jul 14 '19 at 23:47
0

well i know a guy who post a similar project on github. link :- https://github.com/thanh-nguyen-kim/Unity_Android_Screen_Recorder

but there is a limitation and that is this code is only works on android devices(android means only android not even on ios). but this is very powerful recorder and it is capture whatever appear on screen(so basically it is a screen recorder made with unity) and also it will capture your microphone output.give it a try.
and if you find any other solution then please also tell me. because it will very helpful for me.because i want to record video with in-game audio and also save it into gallery

Ahmed Ali
  • 1,908
  • 14
  • 28
0

Unity now has a screen recording tool builtin. It's called Recorder and doesn't require any coding.

  1. In Unity, go to the Window menu, then click on Package Manager
  2. By default, Packages might be set to "In Project". Select "Unity Registry" instead
  3. Type "Recorder" in the search box
  4. Select the Recorder and click Install in the lower right corner of the window
  5. That's about all you need to get everything set up and hopefully the options make sense. The main thing to be aware of that setting "Recording Mode" to "Single" will take a single screenshot (with F10)

NOTE: This is a copy of my answer from a Unity screenshots question

MXMLLN
  • 1,387
  • 2
  • 12
  • 12