Camera GIZMO wrong size

In Unity 2021, after version 2021.1.4, when I created a new 2D project the camera gizmo the gizmo is not perfectly aligned with the scene grid.
Please see the image below:

This happen with every camera size.

Look also this:

The border bottom border of the camera gizmo is not aligned with the square grid of the scene.
The camera stay at 0,0,-10 as usual and has a size of 5 as usual.

It won’t be unless the combination of your Game window aspect ratio and your ortho height line up to one of these magical scene line markers.

This is not aligned when I created a new project with default settings:

Game Window → Free Aspect
Camera mode → Ortho with size 5

Can you post me an example of what are you saying? Because there is no way to make that things aligned.

Until Unity version 2021.1.4 all was ok…

Thanks

Make this something fixed such as 2:1 and it will line up fine, but why do you care?

I’m guessing you either didn’t notice or didn’t have the Game Window set to Free Aspect.

You can anchor anything you want any way you want. If you want it to follow the left edge, you must anchor it there, otherwise you must do your own anchoring code, which would be madness considering the UI does it for you.

Here are some notes on UI Anchoring, Scaling, CanvasScaler, etc:

https://discussions.unity.com/t/845782/4

https://discussions.unity.com/t/848795/5

Oh, it’s useful when, for example, you want to align sprites from a border… Those are sort of like guides for me…
for example look at the picture below: the red square is “cut” and in fact the same happens in the game view.

7620700--947647--Unity_NTbUUsTf7u.png

Yes but I want to align not using canvas or other UI elements. Only sprite rendered element.

Maybe I am missing something?

Thanks for your support.

Sprites live in world coordinates.

The camera dimensions affect view of this world based on camera settings plus display aspect.

If you need it constant you need to force a particular aspect ratio and then deal with letterboxing.