如何在Unity中记录屏幕并以文件形式输出 [英] How to record the screen in Unity and make output as a file

查看:108
本文介绍了如何在Unity中记录屏幕并以文件形式输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的游戏中是否有任何方法,例如编码或使用免费资产来实现屏幕录制功能.

Is there any method, such as coding or using a free asset to make screen recording function in my game.

我正在开发Unity,并且我的项目在我玩游戏时需要提供重播,并将该重播的输出作为文件输出.

I'm working on Unity and my project needs to provide a replay when I am playing my game and make the output of that replay as a file.

谢谢.

推荐答案

您可以查看我们的开源项目: https://github.com/getsocial-im/getsocial-capture .自述文件中包含C#示例.

You can check out our open-source project: https://github.com/getsocial-im/getsocial-capture. C# examples are in the readme.

您可以在2种模式下录制:

You can record in 2 modes:

  1. Continuous模式-捕获最后X帧.
  2. Manual模式-必要时自行捕获帧.例如,记录关卡的间隔时间.
  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.

这是来自测试应用程序的游戏会话的记录.录制的GIF预览最后显示出来:

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

这篇关于如何在Unity中记录屏幕并以文件形式输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆