|
I am trying to take a screenshot of just half the screen. Taking the full screenshot, and sending it to webform works, just like in this example. Each time I try it with just half the screen, I get the fatal error, "Trying to read pixel out of bounds UnityEngine.Texture2D:ReadPixels(Rect,Int32,Int32)"
width and height are assigned as floats:
(comments are locked)
|
|
You're trying to make the rectangle "Screen.width" wide, but you start reading halfway across the screen. You need to make it as wide as only half the screen.
(comments are locked)
|
