/// <summary> /// 通过相机截图 /// </summary> private void ScreenShotByCamera() { if (IsScreenShoting) { return; } IsScreenShoting = true; if (screenShotCamera == null) { return; } //Debug.LogError("StartShot"); StartCoroutine(CaptureCamera(screenShotCamera, new Rect(0, 0, ImageWidth, ImageHeight), picBytes => { //recordTime = DateTime.Now; ThreadManager.Run(() => { CommunicationObject service = CommunicationObject.Instance; if (service) { Picture screenPic = new Picture() { Name = PicName, Info = picBytes }; service.EditPictureInfo(screenPic); } }, () => { //Debug.LogError(string.Format("EditPictureInfo cost time:{0} ms", (DateTime.Now - recordTime).TotalMilliseconds)); //recordTime = DateTime.Now; IsScreenShoting = false; }, ""); })); }