public Texture2D CaptureScreen() { int x = (int)(currentRect.x * Screen.width); int y = (int)(currentRect.y * Screen.height); int width = (int)(currentRect.width * Screen.width); int height = (int)(currentRect.height * Screen.height); return(UtageToolKit.CaptureScreen(new Rect(x, y, width, height))); }
public Texture2D CaptureScreen() { int x = Mathf.CeilToInt(currentRect.x * Screen.width); int y = Mathf.CeilToInt(currentRect.y * Screen.height); int width = Mathf.FloorToInt(currentRect.width * Screen.width); int height = Mathf.FloorToInt(currentRect.height * Screen.height); return(UtageToolKit.CaptureScreen(new Rect(x, y, width, height))); }