Text size changes when I turn it horizontally? - unity3d

I created a simple Text on scene. When I change resolution to 1080x1920 it changes its the size. . As you can see in second picture text size lower than first So how can I solve the problem?

click on the canvas in the hierarchy, than change in the inspector the size mode (i forgot it's name in unity) , and choose physical size, or something else, and tweak the scaling to 0.5,so the text will be scaled with the screen resolution changes, hope it fix ur issue

Related

Unity - UI Positions

I currently have a problem on a UI.
The button on the phone moves when changing resolution and changes size as well. On the screenshots, it is in the General Panel. I also tried to put a second panel of the size of the phone, but it is all this panel that moves and changes size. How can I do, to keep the buttons at the right size and in place, as the background does when changing resolution?
Thanks in advance !
You need to change the UI Scale Mode to "Scale With Screen Size".
THe Reference Resolution can help you place items in the editor. You can choose wether you want the width or the height (or a mixture) to be preferred when fitting the canvas to the resolution.
If you, for example, choose "Width" in the "Match" slider, the elements will never overshoot horizontally. This would be perfect for wrapping textfields.

Why there is a difference in the text size when show it in one Text ui and another Text ui with the same settings?

The post is a bit long but I tried to explain everything that is connected to the issue.
This screenshot is of the parent ui texts canvas.
This is a screenshot of the description ui text the text in the game looks very big the fonts are very big and stretched.
This is a screenshot of the scene text Image settings :
And the scene ui text settings :
This is a screenshot of the scene ui text when running the game from the exe build file :
And last the description ui text in game when running the build exe file :
How can I make some ui text that will be display the text the same in all the cases something that will be readable nice not too small and not too big ?
In the scene text the text is smaller because I wanted the text to be a bit under the player mouth. In the description text is a bit bigger but then everything get messed.
I think I want the text to be shown like in the scene ui text in all the places. I think the size is fine. but not sure how to do it.
There's a couple of things here that should get your text working nicely across the board.
Firstly, at your root Canvas object, you'll usually have a Canvas Scaler there. The default of "Constant Pixel Size" is often exactly what you don't want. I normally have it set to "Scale With Screen Size", and then set the resolution to 1920x1080. I do that because 1920x1080 (16:9) is the standard Full HD screen size, so you can bet that most of your screen layout is going to look the same across most displays.
The second suggestion would be to use TextMeshPro. If you haven't already got it installed through your Package Manager, then you can find it there. Here's the docs for that. It's FAR superior to the standard Text element and you'll notice less issues trying to get your text looking correct. It's usually just a matter of adding the TMPro_Text UI component to the same object your Text component was originally on (removing the original Text component of course).
I would also leave all scaling for all of your UI items set to (1, 1, 1) where you can and let and scaling be done by the Canvas Scaler. The text elements can certainly be left at (1, 1, 1) and just change the font size.
Once you get these three things sorted, your text should be the same across all of your pages, and devices.
This due to Scaling Rect Transform Component
to solve this don't scale up or scale down UI Elements {Image ,Text, ... just keep Scale 1,1,1 }
First I recommend You to see This to understand this Component
https://www.youtube.com/watch?v=FeheZqu85WI&t=6s
Now to Solve your problem
Set Scale of Description Image (1,1,1)
Set Scale of Description Text (1,1,1)
Do 1,2 with Scene Image, Scene Text
Change Width , Height of{Description Text, Scene Text} with small values 900*400

How can I set Unity editor resolutions properly

I'm new to unity and to be honest , it's resolution system looks very weird to me. Hope it will make sense once I get used to it. But for now, here is my problem:
I've set resolution under "build" tab to 1920x1080 (also tried with 16:9 ratio as well) . then I imported a 1920x1080 image. but when I try to display it, borders of the image doesn't show up. Clicking on play or pausing it doesn't solve it.
(approximately 20% of the image from all directions are not shown) .
what is the reason, and how can I solve this?
edit
Screenshots - intentionally draged sprite a little down so you can see canvas' borders.
ss1 https://prnt.sc/qj0pad
ss2 https://prnt.sc/qj0pty
ss3 https://prnt.sc/qj0pzs
This is due to your canvas size.
When you drag and drop an image onto your scene, it will import it as a UI Image and create a Canvas to hold it. On the Canvas, the UI Scale Mode field of the Canvas Scaler component is by default on Constant Pixel Size. You'll want to change it to Scale With Screen Size and then put your resolution in the Reference Resolution field that appeared (which is 800x600 by default).

Unity: text is clear in editor but blurry in game

I've read that Unity has problems rendering clear text and I've tried out several different fixes: setting a large font size on the imported font and changing the character setting to unicode, making the text size large and then scaling it down, setting filter mode to point when it comes to pixel fonts... All these methods seem to work from the editor (as in, the text appears crisp), but in the game the text is still blurry:
vs.
(The screenshot is using free aspect - the text looks better, but still somewhat blurry, when the game view resolution matches the reference resolution.)
Currently, the imported font (not pixel) is set to a size of 180; rendering to smooth; character to unicode. The text isn't scaled right now and is at a size of 50. The canvas is set to scale with screen size, and the reference resolution is 2560x1440 (a Samsung S7). It should also be noted that at a different resolution, the box around the text (which is an image) also gets blurry, which makes me think it's a problem with the canvas scaling.
What am I missing?
Turns out all I had to do was uncheck Low Resolution Aspect Ratios in the game view... The text is still slightly blurry, but likely that's typical of Unity. To counter that, I just decided to use a pixel font (using the fix explained in this video).
I use scaling down as a workaround.
For me, it was using Unity-Remote. After building the app directly I didn't see the blur anymore.
I had the same problem, the best solution to the blurry text problem in Unity is as follows:
Select the text item from the scene.
Go to Font and see where your font is located in your project folder
Go to your font in your project
Change the font size from 16 to 100-300
change "Character" to "Unicode"
Press Apply

NGUI UILabel text blurry (Unity)

After trying to adjust several settings I am still getting blurry text in my NGUI labels. Does anyone know what the issue could be? I tried increasing the font size.
Below is a screenshot that demonstrates. Why is the NEW HIGH SCORE text not high resolution?
UPDATE:
I turned on MakePixelPerfect but the text is still blurry:
This is either a result of font scaling from a font atlas with mip-mapping set to true or it is a result of MakePixelPerfect not being set.
Turn off mip mapping on your font atlas or make sure your labels and parent hierarchy objects run MakePixelPerfect(). Select your label and press alt+shift+p. This should enforce the pixel perfect setting for you.
According to your screen grabs you are using bitmap font right?
If so,
Select texture used by that font
In Inspector select texture type as GUI
This will remove compression. Also make sure your Max Size isnt smaller than texture