I am making an app that has a custom viewport Rect like so:
When I check the sizes of this viewport rectangle in pixels with
Camera.pixelHeight; Camera.pixelWidth, I get the following values: 743px, 770px.
This looks correct.
Now when I check my canvas in the Editor, I see the following values for the width and height:
Now I have a script that gets the width and height of the canvas. This is correct: I get again the 743px and 770px. But when I position my UI element, it is outside because the positioning refers back the the incorrect values displayed in the canvas rectangle transform properties.
What is happening here and how do it make the canvas use the correct values?