- Home /
How to maintain world and game object pixel size no matter the screen size?
(Unity 5.5.0b8)
I can't seem to find the right terms to find the answer to my question, and I would imagine it's been asked many times, so I apologies in advance..
I'm trying to create a 2D isometric game world. My game will have a scrollable game world (entire map) and viewport (the client's viewable area). The client will only view part of the world depending on their screen size (viewport). My world and the game objects within should maintain their actual pixel size no matter the device used to play the game.
How can I accomplish this (roughly)? Everything I do seems to scale my world and game objects depending on the screen size.
Can you elaborate on what you mean by "actual pixel size"? Do you mean you want an 8x8 image to use 8x8 pixels on the screen no matter the device resolution?
Yes. If I have an 8x8 pixel image in the game world, I want it to display as an 8x8 pixel image, no matter the screen resolution. Thanks :)
If I understand your question correctl, you need to work with the Anchors. It's those little triangles you see either clustered in the center of the Canvas or around your image. They are very useful when making 2D menus to keep them in place no matter what screen resolution you have. Just click and drag the arrows to be the exact spot you want that picture / text / button to always be.
Answer by Glurth · Oct 27, 2016 at 03:34 PM
http://answers.unity3d.com/questions/588432/why-2d-camera-is-not-pixel-perfect.html perhaps this will help? I've never tried tonic's answer- looks like it should work though.
great! and thx to whoever converted my comment to an answer :) $$anonymous$$ay I suggest, lets all upvote the linked-to question, and tonics answer?
Your answer
![](https://koobas.hobune.stream/wayback/20220612095520im_/https://answers.unity.com/themes/thub/images/avi.jpg)