2020
09-27
09-27
Unity实现截屏以及根据相机画面截图
在游戏开发和软件开发中,经常需要截图的功能,分带UI的截图和不带UI的截图功能。代码如下:usingSystem.Collections;usingSystem.Collections.Generic;usingUnityEngine;publicstaticclassScreenShotForCamera{publicstaticvoidCaptureScreen(string_path=null){if(_path==null)_path="Screenshot.png";Application.CaptureScreenshot(_path,0);}publicstaticTexture2DCaptureScreen(Rectrect,...
继续阅读 >