Is the resolution of HoloLens 2 really 2048*1080? - unity3d

I created a canvas with Render Mode Screen Space - Camera and UI Scale Mode Scale With Screen Size. Then I set the Reference Resolution to 2048 * 1080.
canvas settings
I put a circular ring in the upper right corner of the canvas. However, after deploying the project, part of the ring is obscured in HoloLens.
canvas in unity
canvas in HoloLens 2
So I want to know if the resolution of HoloLens 2 is really 2048 * 1080, or if there is a mistake in my project?

HoloLens 2 is set to the maximum render target size, which is 1440x936, by default. For more information please see:Supported resolutions on HoloLens 2

No it`s not. Formula to take Rigth Canvas size for Hololens is:
Set size of WorldSpace Canvas to 490 278 and set position to 0,0,z
You need to multiply V3 scale by this formula scale(x,y,z)=z*0.00415f

Related

Screen space camera canvas aliasing

I have a number of images and text mesh pro assets on a screen space camera canvas (not overlay, so this question is not a dup) with a 45 deg FOV perspective camera and I'm getting jaggies on every asset that is rotated on an axis other than 0, 90, 180, 270 deg.
Images and text mesh pro are equally affected.
The plane distance from camera makes no difference, nor does the
scale or size of the assets.
I have a canvas scaler but no settings change the aliasing.
I'm using post processing stack 3.2.2. I've tried all 3 AA methods,
each has a slightly different effect but the aliasing is always quite
noticeable.
I've disabled the post processing in case it's another effect but no
change.
Changing Anti Aliasing in quality settings to affect the cameras MSAA
has no effect at all.
Because images and text are affected equally - including the default
image sprite in the above picture - I don't think mip map settings
etc are the issue.
I've increased atlas resolution to max for the TMPro assets to no
effect.
Anything else I can try?
Cross posted on GameDev and UnityAnswers

Unity - 2D - Draw a sprite with it's "real" size

Is there a way to draw a 10x20px sprite always with 10x20px regardless of the resolution?
I don't mean to add it as a UI/canvas object, I want to be able to place it in the world and move it or move the camera.
thx for any help!
If using an Image component you can hit the Set Native Size button in the Inspector
Set the dimensions of the image box to the original pixel
size of the Texture.
In order to move it and place it in 3D it has to be a child of a Canvas with RenderMode = WorldSpace
Then also note the options of the Canvas especially the CanvasScaler -> Reference Pixels Per Unit value. It should be 1 in your case before hitting Set Native Size in the Image.
You can do that by setting the Camera ortographic size to the correct size. Try the 2D Pixel Perfect Camera package by Unity https://blogs.unity3d.com/2019/03/13/2d-pixel-perfect-how-to-set-up-your-unity-project-for-retro-8-bits-games/
The script in that package will automatically set your Camera ortographic size with provided parameters. If you want to manually set it, the formula is:
Camera ortographic size = vertical resolution / PPU / 2
Vertical resolution means the target vertical resolution that your sprite was designed for. For example, if your sprite is designed to look pixel perfect on 1600x900 screen, then the vertical resolution will be 900.
PPU means the pixel per unit, by default all imported sprites are set to 100.

Unity Canvas does not fill screen

I have a 2D game set to 1080p pixel size (so each unit equals 1 pixel) and I have added a canvas to my scene. However the canvas fills only about 1/8th of the screen and is also not central either. All the canvas size and position settings are locked so I cant move it or resize it. The canvas itself does reflect the screen (ie if I put text in the top right corner it appears correctly) but the size makes it hard to judge where best to position the elements).
How do I get the canvas to fill my scene?
On your canvas, set the Canvas Scaler component's Ui Scale Mode to Scale with Screen Size. Then you can define a Reference Resolution of 1080p, i.e. 1920 x 1080.
EDIT: To see the canvas fit into the camera's size in the scene, change the Canvas component's Render Mode to Screen Space - Camera, and drag the camera from the hierarchy to it.
(check this video)

Image size incorrect in Unity

I have a Unity 2D project with a fixed screen size of 800x450 pixels.
I have imported a background image that is also 800x450 pixels.
When placed on the stage, the image only takes up half of the screen.
The scale of the image is set to 1,1. The Z position is 0.
Why is the image displayed too small? How can I display the image at the correct resolution?
Does this mean that I have to design all my game assets at 2x the required size? Or that I somehow have to set the scale for all imported assets at 2? What is the recommended workflow?
EDIT
I have added a screenshot of the camera settings:
I would trying making your camera orthographic, and set the size of the camera (not the transform) to be half the height that you would like it to be (225)
Also if you are looking for pixel perfect game. here is a pretty good article from Unity about how to make that work and it explains some of the camera aspect ratios and scaling
http://blogs.unity3d.com/2015/06/19/pixel-perfect-2d/

aabb.IsValid() Error with Canvas Scaler and Sprites (Unity3d)

I am trying to add a sprite background to my canvas.
The canvas is set to render mode Screen Space- Camera so that the canvas size matches the main camera view.
The canvas scaler is set to scale with screen size with a reference resolution of 1920 x 1080.
When I place any sprite into the canvas as a child I get errors that occurs only when unity first starts.
aabb.IsValid()
IsFinite(outDistanceForSort)
UnityEditor.DockArea:OnGUI()
IsFinite(outDistanceAlongView)
UnityEditor.DockArea:OnGUI()
I am thinking this is a bug just with the scene/game previewer in unity itself since when I clear the error on initial load it does not come back. I know it has to do with either the canvas scaler or the sprites since when I disable them either of them the error does not appear. Also, I need the settings to scale as I have them set so that the background images are properly sized in different resolutions.