private void Awake() { if (_ScreenShotTool == null) { _ScreenShotTool = this; } }
IEnumerator Test() { ScreenShotTool.StartScreenShot(new Rect(0, 0, Screen.width, Screen.height), 1); //测试 yield return(new WaitForEndOfFrame()); yield return(new WaitForEndOfFrame()); mask.SetActive(true); screenShotImage.texture = ScreenShotTool.GetScreenShot; StopCoroutine("Test"); }
private void Awake() { GetComponent <Canvas>().worldCamera = MagiCloud.MUtility.UICamera; //设置渲染相机 kinectImageCamera = MagiCloud.MUtility.UICamera; //变量初始化 if (FindObjectOfType <MagiCloud.Core.MInitialize>().CurrentPlatform == MagiCloud.Core.OperatePlatform.Kinect) { kinectImage = FindObjectOfType <MagiCloud.Kinect.KinectAR>().kinectImg; } screenShotCamera = MagiCloud.MUtility.MainCamera; if (_ScreenShotTool == null) { _ScreenShotTool = this; } }