RectTransform.GetWorldCorners World or Screen space

Hi guys,

just was using RectTransform.GetWorldCorners today

on a UI Button in a Canvas.

as Description says i will get 4 Vectors which are representing the corners of the RectTransform in WorldSpace, but as i was implementing it, i am getting the Vector3 in ScreenSpace.

So it’s no problem actually, but question is just if anyone knows wy i’m getting SpaceScreen Position instead of WorldSpace like the description says. Could it be because of the Canvas ?

Best regards,

well it would be WorldSpace. A overlay canvas (if not moved) will mimic the screen space coordinates (which is why its so large in the scene view)

the good thing about is that i can use Input.GetTouch(0).position directly :slight_smile: