Search code examples
c#unity-game-enginehololensunity-ui

Why image has different pixel resolution in Hololens


I'm working on application, where small UI.Images are displayed with small textures 32x32 pixels. It is very important to display each pixel properly.

When I'm trying to launch the application in Unity everything is perfect - Image consists of 32x32 pixels.

Image in Unity

While deployed to Hololens, the Image has worse quality and resolution changes to 16x16 pixels.

Image in Hololens

The question is how to obtain texture displayed in 32x32 pixels quality on Hololens device?


Solution

  • Ok, finally I figured it out. In Unity Edit > Project Settings > Quality the option Very Low is used for Hololens application. In this mode the Texture Quality is set to Half Res, thus the Image was rendered with half of the pixels' number (16 pixels). When changed to Full Res, the Image get original 32 pixels size.

    It does not explain why in Unity Editor the Image was displayed properly, but the most important thing is that now it's working properly on the device.