When i change my canvas to world space, scrollrect contents are not properly transformed.
First i thought they are empty, but it turns out they are perspectively distorted.
I can scroll, but the content is not correctly projected in 3d, which makes all scrollrect contents appear empty (they arent, the content is just anywhere but where it should be on the canvas)
Anyone else having this issue?
- Happens in 5.2.2f1
- Forward rendering, canvas is not rotated nor scaled.
- doesnt matter if Rect2DMask or Mask is used, both have the same result
- even without any mask, same issue. its def. related to the scrollRect rather than masking
Some findings:
I’ve looked at the content children in the inspector, and they all had strange rotation and position.z values.
Setting rotation to 0 and position.z to 0 fixes it.
How do the child controls get these strange values?
This only seems to be a problem with elements that were added at runtime.
Things already on the canvas when the game starts don’t have this issue.