Unity内实现无卡顿取图像推流/截屏等功能

一、Unity提供的ScreenCapture取图像接口

众所周知,Unity提供了ScreenCapture API用来获取引擎最终渲染到屏幕的图像:
在这里插入图片描述

二、我们一个一个看API:

1.CaptureScreenshot是一个很单纯的给一个文件名将屏幕保存一张图像到磁盘的接口,而实际项目中我们需要对屏幕截图做很多操作,所以该API不太适用。

using UnityEngine;
// Generate a screenshot and save it to disk with the name SomeLevel.png.
public class ExampleScript 

Supongo que te gusta

Origin blog.csdn.net/cxihu/article/details/127869597
Recomendado
Clasificación