Unity Android UI scaling problem

So for the past month I have been trying to find what I’m doing wrong cuz whenever I try setting my UI to scale whit my camera(Which is on free Aspect mod) the UI just doesn’t look good examples:

1.Normal look(the one I want)

2.Scaling the camera up

  1. Which is alright most of the times
    http://i.imgur.com/hKA155h.png

Ty for your help :slight_smile:
Also another pic: http://i.imgur.com/uuATG7n.png

2 Answers

2

One of the easiest ways is to put the UI anchors in the corners of the UI object itself, like this:

39781-anchorcorners.png

Should scale pretty well apart from extreme cases.

Ok but do I keep the Canvas to scale whit the camera if its on free aspect?

Not sure, not used world space for my stuff so far so don't want to lead you down the wrong path but this is what the documentation on world canvas says: > If you want it to have a specific width in meters, you can can calculate the needed scale by using meter_size / canvas_width. For example, if you want it to be 2 meters wide and the Canvas width is 800, you would have 2 / 800 = 0.0025. You then set the Scale property of the Rect Transform on the Canvas to 0.0025 for both X, Y, and Z in order to ensure that it’s uniformly scaled.

Are your Canvas anchors in the right place? Remember the corner anchors denote that you want the same amount of space between each anchor point no matter the resolution of the screen. Also, do you have your Canvas set to Scale with Screen Size?

Do you mean Screen Space overlay, if yes, no actually I set it to world space, but I tested whit screen space overlay and I still get the same thing

In Eclipse android auto selects resources based on screen sizes, ldpi, dpi, xdpi, xhdpi, etc, does unity have a similar mechanism for Android builds?