文章目录
- 一、Unity提供的ScreenCapture取图像接口
- 二、我们一个一个看API:
- 三、Unity日本大神keijiro还提供了一种异步截图的方案,完整代码如下:
一、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 : MonoBehaviour
{





![[附源码]java毕业设计基于web的硕士研究生入学考务管理](https://img-blog.csdnimg.cn/f55649ed511942d7ad1cd23ad79e9cb5.png)













