- Home /
Screen space canvas not resizing correctly when android device is rotated
Hi,
I'm having a problem with the screen-space canvas on an Android device I'm testing (Fairphone 1 - Android 4.2.2). When the user rotates the screen while the app is running, the new screen orientation is correctly detected, and the UI elements are correctly rotated, however the screen-space canvas is not resized to reflect the new dimensions available to the app.
Here is a picture to try and illustrate the problem: http://imgur.com/MzSUL6M
What can I do? I can't change the size of the canvas manually AFAIK because it's screen-space.
I also need it to continue supporting the canvas scaler I'm using (constant physical size).
I've tried changing the Screen width & height via code and while this does fix the unresponsive section of the screen problem, it warps all of the game's graphics (stretches and squashes as if changing the scale value of the canvas, rather than the width/height values).
Strangely, the canvas resizes just fine if I leave the app running, return to the android home screen, then back to the app. The app works fine in both directions, but only using the orientation that the user entered the app in - it cannot handle changing orientation within the app.
Thanks,
can you show me the screenshot of your canvas in inspector?