Vuforia SDK Version: 4.2.3 -Description with steps to reproduce:
Before adding Vuforia I made an UI using unity's modern UI (with canvas and all objects on it). Works great unless you replace camera with Vuforia's camera.
It looked OK in the editor, but on the Android device in landscape it was scaledup, so only ~7/8 part of UI fits inside the screen. But in portrait mode it is vise versa, the canvas is scaled down to cover only ~7/8 part of the screen.
Now after fiddling I did realize, that UI behaves wierd in the editor. In the scene I see that UI canvas covers exactly 100% of camera frustrum. In the game it is scaled up, so I can see only ~7/8 part of it in camera.
This is very confusing.
How does the AR_camera works exactly? Or am I allowed to use Unitys modern UI? If no... Thats really bad.
-Development OS (Mac OS X, Windows, Linux): Windows -Mobile OS and Version: Android Jelly beans 4.1 -Mobile Device Manufacturer and Model name: GoClever R 70 -Do the Vuforia Sample Applications show the same behavior?: No They used different, a very complicated UI system. I would not like to use such.
Unity 5 UI scaling goes wild and more
The Canvas can scale according to different models (World /Camera/Overlay), but in any case there are some elements to keep in mind:
Unity 5 UI scaling goes wild and more
My problem is not in inability to use UI. I test it for different resolutions in Editor. I know this tutorial. This is why I started to use this UI, its simple and elastic ways to use it for any resolution.
Unity 5 UI scaling goes wild and more
1. what Unity version are you using (5.0.1, 5.0.2, 5.0.3, 5.1.0, 5.1.1...)
2. how is your UI canvas configured (World Space UI, Camera or Overlay) and what Canvas Scaling mode you are using...
Unity 5 UI scaling goes wild and more
Unity 5.1.0f3 (also 5.1.1f but it gave the same results)
Canvas:
Render modes
Unity 5 UI scaling goes wild and more
OK,
here is what I would suggest, as this appears to work correctly on a quick test I made:
Unity 5 UI scaling goes wild and more
This is with your settings. I dont see any difference. (WIN_20150630_185534.JPG; WIN_20150630_185603.JPG)
I also tried Constant Pixel Size, but the result was exactly the same. (WIN_20150630_184225.JPG; WIN_20150630_184257.JPG)
Unity 5 UI scaling goes wild and more
I've made a simple test with a basic Scene with:
- an ARCamera
- a Canvas with a Panel, a Vertical Layout group, and 4 buttons; I've also set a padding of 50 pixels in the Panel
- I tried with Overlay and Camera modes
Unity 5 UI scaling goes wild and more
Just realized that camera on my device is misconfigured. The image is stretched vertically (my face in landscape is round, but in portrait - thin, in game and in actual camera app). So Vuforia changes Cameras frustrum. But UI does not realize that.
Unity 5 UI scaling goes wild and more
Hello
Unity 5 UI scaling goes wild and more
@