- Home /
trouble when rendering canvas on android
Hello everyone,
I'm sorry if my question is a stupid question but I have some trouble with the canvas size when rendering on android.
I'm using Unity 4.6.1 and my application have to be only supported by an android with a screen size of 2560*1504 in landscape (left or right).
In the hierarchy panel, I've added a canvas with a scale factor of 0.45 in order to have a width of 2560 and a height of around 1504 in the Rect Transform.
Inside this canvas, I've added a simple image with a size of 2560*1352.5 with a pivot in the top center. (I have some other image but doesn't matter at this point)
In the player setting, I've set the default Orientation to Landscape Left and run the application but when my screen is displaying, all my image width has been divided by 2 and and are centered in the middle of the screen.
My background image doesn't have the Preserve Aspect checkbox checked.
It look like that the aspect ratio has been kept and the width and height I've set has been ignored.
Could you please tell me why my canvas is not displaying in full screen?
I really thank you in advance for your help.
edit: all my canvas render mode is set to "Screen Space - Overlay"
Answer by Mad App · Feb 01, 2015 at 06:06 PM
Make sure you have set JAVA_HOME in your environmental variables in Windows system settings. This should fix some problems with Canvas images. And on your hierarchy , Set your anchors/pivots for your images/ buttons.