尧图建网站 尧图建网站 YAOTU WEB BUILD 免费咨询
ARTICLE DETAIL

资讯详情

深耕网站建设与建站编程的一线实战洞察。

手动切窗口录游戏 demo 太折腾?GenericFrameRecorder 把 Unity 逐帧录制搬进 Timeline

手动切窗口录游戏 demo 太折腾?GenericFrameRecorder 把 Unity 逐帧录制搬进 Timeline 手动切窗口录游戏 demo 太折腾GenericFrameRecorder 把 Unity 逐帧录制搬进 Timeline【免费下载链接】GenericFrameRecorderThis GitHub package is DEPRECATED. Please get the new Unity Recorder from the Asset Store (https://assetstore.unity.com/packages/essentials/unity-recorder-94079) Use the editor builtin Bug Reporter to report issues. You can track and vote for issues on the Issue Tracker (https://issuetracker.unity3d.com)项目地址: https://gitcode.com/gh_mirrors/ge/GenericFrameRecorder每录一次 gameplay都要手动切窗口、盯帧率、导出格式再返工反复折腾。GenericFrameRecorderUnity Recorder 的前身把录制做成了一等公民一个统一框架接管时间管理、帧回调与录制窗口Timeline 轨道上的一个 clip 就能触发整段录制。它替代了哪些手工录制流程它不是某个具体录制器而是一套录制框架Recorder 负责编码与存储Input 负责从引擎里拿数据框架负责帧回调、帧率 pacing 和编辑器 UI。内置 ImageRecorder 输出 PNG/JPEG/EXR 序列你自己写一个 Recorder 类挂上 [Recorder] 特性会被自动注册并出现在菜单里。Recorder、Input、Session 三层如何协作Recorder只消费输入、写文件。以 ImageRecorder 为例每帧从 RenderTexture 读入 Texture2DEncodeToPNG/EncodeToJPG/EncodeToEXR后File.WriteAllBytes落盘一帧一个文件。Input知道怎么拿特定数据源。RenderTextureInput 直接绑定目标 RTScreenCaptureInput 直接截屏不与 Recorder 耦合可跨录制器复用。RecordingSession RecorderComponentUpdate 里PrepareNewFrameLateUpdate 加WaitForEndOfFrame后调session.RecordFrame()固定帧率模式用Thread.Sleep拖慢渲染保证输出帧率达标。RecordersInventory反射扫描所有程序集找出带 [Recorder] 特性的类并按分类登记编辑器菜单点开的就是这份注册表。两条路径跑通第一次录制先git clone https://gitcode.com/gh_mirrors/ge/GenericFrameRecorder把源码放进工程。路径一录制窗口Recorder 菜单选类型打开录制窗口配置输入源、输出路径、帧率与时长模式手动 / 单帧 / 帧区间 / 时间区间点 Start Recordingedit mode 和 game mode 都能触发定长模式到点自动停路径二Timeline 触发创建 Timeline asset加一条 Recorder Track放一个 Recorder Clipclip 长度即录制时长进 play modeclip 播放到即开始、播完即停全程由轨道驱动适合批量出片什么时候用它、什么时候别用需要自定义输出格式EXR 序列、自研动画文件或用 Timeline批量、可复现地触发录制选它Recorder 基类源码 不到 200 行读完即掌握框架全貌。只是想快速出个 MP4别选它Asset Store 的官方 Unity Recorder 更直接本仓库 README 已明确标注 DEPRECATED框架被并入官方包。另有两个已知限制帧率在 Recorder 级别设置多录制器并存会冲突录制仅支持 Player standalone不支持编辑器内。它的价值在于把录制变成可被 Timeline 驱动的标准接口时间管理、帧回调、编辑器 UI 不再需要每个录制器各写一遍。想深入架构从 README 的 Design 章节读起再对照 source/FrameRecorder/ 下的源码即可。【免费下载链接】GenericFrameRecorderThis GitHub package is DEPRECATED. Please get the new Unity Recorder from the Asset Store (https://assetstore.unity.com/packages/essentials/unity-recorder-94079) Use the editor builtin Bug Reporter to report issues. You can track and vote for issues on the Issue Tracker (https://issuetracker.unity3d.com)项目地址: https://gitcode.com/gh_mirrors/ge/GenericFrameRecorder创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表