- Home /
UI Image size
Hello!
My sprites have a PPU of 16. The Canvas Scaler is set to scale with screen size Reference Resolution of x:1024, y: 768 I have set Match Width Or Height, matched 0.5 With a reference pixels per unit of 16, since thats the sprite PPU Then I put an image in the UI with a sprite of PPU 16, that is 16x16 pixels. So I set width and height to 16. But it becomes super tiny? It doesn't at all become 16x16? In fact I think it became 2x2? Even tho the scale is set to 1. Pressing "Set Native Size" doesn't do anything.
Am I doing something wrong or is the Unity Canvas just really fucked up
Answer by RodrigoAbreu · Feb 18, 2019 at 07:58 AM
Hey @cupofcreeper98, so what is your screen orientation, landscape or portrait? Was your image exported from the 2d software using PPU/PPI 16 as well? Here is a sample project I created for you using your same canvas scaler resolution and a 16x16 image exported from photoshop using 72ppi (pixels per inch). I used Unity 2018.2.20f1 (64-bit) to create this sample project. Feel free to contact me back if you still miss something. https://drive.google.com/open?id=1vu2WnK34791m8km5-hKyWzhMeOtHp0CG
If you don't mind sharing your own project I can take a look and tell you what was wrong, however, I set this model project the way you described above and everything is working normally, you even see exactly 64 little squares side by side filling the whole width on 1024.
Your answer
Follow this Question
Related Questions
Transform translate not working properly in Canvas 0 Answers
How to change UI image render order dynamically on runtime 1 Answer
Canvas, instantiate and adjust size of image to fit parent 0 Answers
How to see what the UI canvas will look like in the final build? 0 Answers
Re-center UI Image after zooming out 0 Answers